diff options
author | Daniel Willmann <dwillmann@sysmocom.de> | 2016-05-21 00:11:39 +0200 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-08-27 13:29:33 +0200 |
commit | d75864f6f52b6c0730731f485b21599943ef957b (patch) | |
tree | 9059edcb93c5a20c708cebd6703e75f314b3d617 /openbsc/src/gprs/gprs_gmm.c | |
parent | 746c7896cba944c1978b48a40c4588a7aeb4eb84 (diff) |
IuPS: track msg->dst aka ue_conn_ctx, comment
For Iu connections, msg->dst will point to the ue_conn_ctx, and we need to make
sure to keep msg->dst intact when copying from/to msgb and from/to MM context.
Change-Id: I90c7ca6c3655d447aaca958e0086ae6ce6f6045a
Diffstat (limited to 'openbsc/src/gprs/gprs_gmm.c')
-rw-r--r-- | openbsc/src/gprs/gprs_gmm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c index efa25c61e..1efada948 100644 --- a/openbsc/src/gprs/gprs_gmm.c +++ b/openbsc/src/gprs/gprs_gmm.c @@ -150,6 +150,7 @@ static void gmm_copy_id(struct msgb *msg, const struct msgb *old) msgb_tlli(msg) = msgb_tlli(old); msgb_bvci(msg) = msgb_bvci(old); msgb_nsei(msg) = msgb_nsei(old); + msg->dst = old->dst; } /* Store BVCI/NSEI in MM context */ @@ -157,6 +158,8 @@ static void msgid2mmctx(struct sgsn_mm_ctx *mm, const struct msgb *msg) { mm->gb.bvci = msgb_bvci(msg); mm->gb.nsei = msgb_nsei(msg); + /* In case a Iu connection is reconnected we need to update the ue ctx */ + mm->iu.ue_ctx = msg->dst; } /* Store BVCI/NSEI in MM context */ @@ -165,6 +168,7 @@ static void mmctx2msgid(struct msgb *msg, const struct sgsn_mm_ctx *mm) msgb_tlli(msg) = mm->gb.tlli; msgb_bvci(msg) = mm->gb.bvci; msgb_nsei(msg) = mm->gb.nsei; + msg->dst = mm->iu.ue_ctx; } static void mm_ctx_cleanup_free(struct sgsn_mm_ctx *ctx, const char *log_text) |