[PATCH] openbsc[master]: IuPS: track msg->dst aka ue_conn_ctx, comment

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Mon Aug 22 12:36:05 UTC 2016


Review at  https://gerrit.osmocom.org/728

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
---
M openbsc/src/gprs/gprs_gmm.c
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/28/728/1

diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c
index d4cf896..1a030fb 100644
--- a/openbsc/src/gprs/gprs_gmm.c
+++ b/openbsc/src/gprs/gprs_gmm.c
@@ -148,6 +148,7 @@
 	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 */
@@ -155,6 +156,8 @@
 {
 	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 */
@@ -163,6 +166,7 @@
 	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)

-- 
To view, visit https://gerrit.osmocom.org/728
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I90c7ca6c3655d447aaca958e0086ae6ce6f6045a
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: neels_test_account <neels at hofmeyr.de>



More information about the gerrit-log mailing list