Change in ...osmo-msc[master]: libvlr: fix sgsn tmsi creation, replace constant with define

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/.

Hoernchen gerrit-no-reply at lists.osmocom.org
Mon Jun 17 12:51:27 UTC 2019


Hoernchen has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmo-msc/+/14448 )

Change subject: libvlr: fix sgsn tmsi creation, replace constant with define
......................................................................

libvlr: fix sgsn tmsi creation, replace constant with define

reported by _dev_zero in #osmocom

Change-Id: Ib5679ab5d06b6ef735725b4a68eeb1e9cbcc11ba
Depends-On: libosmocore I52b9f6b5f3e96d85a390ba2af21d7814df8aaeec
---
M src/libvlr/vlr.c
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/src/libvlr/vlr.c b/src/libvlr/vlr.c
index 2753096..5610cfb 100644
--- a/src/libvlr/vlr.c
+++ b/src/libvlr/vlr.c
@@ -336,11 +336,11 @@
 		/* Section 2.4 of 23.003: MSC has two MSB 00/01/10, SGSN 11 */
 		if (vlr->cfg.is_ps) {
 			/* SGSN */
-			tmsi |= 0xC000000;
+			tmsi |= GSM23003_TMSI_SGSN_MASK;
 		} else {
 			/* MSC */
-			if ((tmsi & 0xC0000000) == 0xC0000000)
-				tmsi &= ~0xC0000000;
+			if ((tmsi & GSM23003_TMSI_SGSN_MASK) == GSM23003_TMSI_SGSN_MASK)
+				tmsi &= ~GSM23003_TMSI_SGSN_MASK;
 		}
 
 		/* If this TMSI is already in use, try another one. */

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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: Ib5679ab5d06b6ef735725b4a68eeb1e9cbcc11ba
Gerrit-Change-Number: 14448
Gerrit-PatchSet: 6
Gerrit-Owner: Hoernchen <ewild at sysmocom.de>
Gerrit-Reviewer: Hoernchen <ewild at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-CC: laforge <laforge at gnumonks.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190617/74c7f7c2/attachment.htm>


More information about the gerrit-log mailing list