Change in ...osmo-sgsn[master]: replace magic tmsi 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:48:44 UTC 2019


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

Change subject: replace magic tmsi constant with define
......................................................................

replace magic tmsi constant with define

Depends: libosmocore I52b9f6b5f3e96d85a390ba2af21d7814df8aaeec
Change-Id: Icf9f466efce520779c926b47b6e6d6c9815120eb
---
M src/gprs/gb_proxy.c
M src/gprs/gprs_sgsn.c
2 files changed, 3 insertions(+), 3 deletions(-)

Approvals:
  pespin: Looks good to me, approved
  Hoernchen: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/gprs/gb_proxy.c b/src/gprs/gb_proxy.c
index 3da7bfd..3f471ff 100644
--- a/src/gprs/gb_proxy.c
+++ b/src/gprs/gb_proxy.c
@@ -243,7 +243,7 @@
 				break;
 			}
 
-			bss_ptmsi = bss_ptmsi | 0xC0000000;
+			bss_ptmsi = bss_ptmsi | GSM23003_TMSI_SGSN_MASK;
 
 			if (gbproxy_link_info_by_ptmsi(peer, bss_ptmsi))
 				bss_ptmsi = GSM_RESERVED_TMSI;
diff --git a/src/gprs/gprs_sgsn.c b/src/gprs/gprs_sgsn.c
index 5801107..8d3de7b 100644
--- a/src/gprs/gprs_sgsn.c
+++ b/src/gprs/gprs_sgsn.c
@@ -692,12 +692,12 @@
 	 * Alternatively, a freeze list could be used if another PRNG is used
 	 * or when this approach proves to be not sufficient.
 	 */
-	if (ptmsi >= 0xC0000000) {
+	if (ptmsi >= GSM23003_TMSI_SGSN_MASK) {
 		if (!max_retries--)
 			goto failed;
 		goto restart;
 	}
-	ptmsi |= 0xC0000000;
+	ptmsi |= GSM23003_TMSI_SGSN_MASK;
 
 	if (ptmsi == GSM_RESERVED_TMSI) {
 		if (!max_retries--)

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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Icf9f466efce520779c926b47b6e6d6c9815120eb
Gerrit-Change-Number: 14486
Gerrit-PatchSet: 2
Gerrit-Owner: Hoernchen <ewild at sysmocom.de>
Gerrit-Reviewer: Hoernchen <ewild at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190617/013560b2/attachment.htm>


More information about the gerrit-log mailing list