pespin has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/34185 )

Change subject: lapdm: Update public lapdm_msg_ctx upon CCCH data ind
......................................................................

lapdm: Update public lapdm_msg_ctx upon CCCH data ind

This allows uses accessing the updated fields such as fn from the l3_cb
when receiving a msg from CCCH, eg: "le->datalink[DL_SAPI0].mctx.fn;"

Related: OS#3626
Change-Id: Icabc3759c47b0f7cfe61f1b7a96f08f36714262e
---
M src/gsm/lapdm.c
1 file changed, 15 insertions(+), 0 deletions(-)

Approvals:
  fixeria: Looks good to me, but someone else must approve
  pespin: Looks good to me, approved
  jolly: Looks good to me, but someone else must approve
  Jenkins Builder: Verified




diff --git a/src/gsm/lapdm.c b/src/gsm/lapdm.c
index e96e218..9f795c6 100644
--- a/src/gsm/lapdm.c
+++ b/src/gsm/lapdm.c
@@ -857,6 +857,8 @@
        case LAPDm_FMT_Bter:
                /* fall-through */
        case LAPDm_FMT_Bbis:
+               /* Update context so that users can read fields like fn: */
+               memcpy(&mctx.dl->mctx, &mctx, sizeof(mctx.dl->mctx));
                /* directly pass up to layer3 */
                msg->l3h = msg->l2h;
                msgb_pull_to_l3(msg);

--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/34185
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Icabc3759c47b0f7cfe61f1b7a96f08f36714262e
Gerrit-Change-Number: 34185
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: jolly <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-MessageType: merged

Reply via email to