Change in osmo-msc[master]: GSM_EXTENSION_LENGTH -> VLR_MSISDN_LENGTH

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
Fri Nov 30 02:45:49 UTC 2018


Neels Hofmeyr has uploaded this change for review. ( https://gerrit.osmocom.org/12036


Change subject: GSM_EXTENSION_LENGTH -> VLR_MSISDN_LENGTH
......................................................................

GSM_EXTENSION_LENGTH -> VLR_MSISDN_LENGTH

gsm_subscriber.h contains some legacy cruft, part of which is that the VLR's
max MSISDN length should rather be defined in vlr.h. Same for GSM_NAME_LENGTH
-> VLR_NAME_LENGTH.

Adjust some sms_queue stuff that anyway includes vlr.h already.

Drop gsm_subscriber.h from vlr.h.

Add other (more concise) includes that thus become necessary, since the include
chain vlr.h->gsm_subscriber.h->gsm_data.h is no longer in place.

Change-Id: Iab5c507ec04fc2884187cf946f6ae2240e4a31f8
---
M include/osmocom/msc/gsm_subscriber.h
M include/osmocom/msc/vlr.h
M src/libmsc/sms_queue.c
M tests/sms_queue/sms_queue_test.c
4 files changed, 9 insertions(+), 9 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-msc refs/changes/36/12036/1

diff --git a/include/osmocom/msc/gsm_subscriber.h b/include/osmocom/msc/gsm_subscriber.h
index 428b889..00d7b98 100644
--- a/include/osmocom/msc/gsm_subscriber.h
+++ b/include/osmocom/msc/gsm_subscriber.h
@@ -10,9 +10,6 @@
 
 struct ran_conn;
 
-#define GSM_NAME_LENGTH 160
-
-#define GSM_EXTENSION_LENGTH 15 /* MSISDN can only be 15 digits length */
 #define GSM_MIN_EXTEN 20000
 #define GSM_MAX_EXTEN 49999
 
diff --git a/include/osmocom/msc/vlr.h b/include/osmocom/msc/vlr.h
index 1865618..c0e4864 100644
--- a/include/osmocom/msc/vlr.h
+++ b/include/osmocom/msc/vlr.h
@@ -10,8 +10,7 @@
 #include <osmocom/gsm/gsm0808.h>
 #include <osmocom/gsm/gsup.h>
 #include <osmocom/msc/ran_conn.h>
-// for GSM_NAME_LENGTH
-#include <osmocom/msc/gsm_subscriber.h>
+#include <osmocom/msc/msc_common.h>
 #include <osmocom/gsupclient/gsup_client.h>
 
 #define LOGGSUPP(level, gsup, fmt, args...)				\
@@ -111,6 +110,9 @@
 struct sgsn_mm_ctx;
 struct vlr_instance;
 
+#define VLR_NAME_LENGTH 160
+#define VLR_MSISDN_LENGTH 15
+
 /* The VLR subscriber is the part of the GSM subscriber state in VLR (CS) or
  * SGSN (PS), particularly while interacting with the HLR via GSUP */
 struct vlr_subscr {
@@ -123,8 +125,8 @@
 	/* Data from HLR */				/* 3GPP TS 23.008 */
 	/* Always use vlr_subscr_set_imsi() to write to imsi[] */
 	char imsi[GSM23003_IMSI_MAX_DIGITS+1];		/* 2.1.1.1 */
-	char msisdn[GSM_EXTENSION_LENGTH+1];		/* 2.1.2 */
-	char name[GSM_NAME_LENGTH+1];			/* proprietary */
+	char msisdn[VLR_MSISDN_LENGTH+1];		/* 2.1.2 */
+	char name[VLR_NAME_LENGTH+1];			/* proprietary */
 	OSMO_LBUF_DECL(hlr, 16);			/* 2.4.7 */
 	uint32_t periodic_lu_timer;			/* 2.4.24 */
 	uint32_t age_indicator;				/* 2.17.1 */
diff --git a/src/libmsc/sms_queue.c b/src/libmsc/sms_queue.c
index fd38d50..c7fe5f4 100644
--- a/src/libmsc/sms_queue.c
+++ b/src/libmsc/sms_queue.c
@@ -64,7 +64,7 @@
 
 	struct llist_head pending_sms;
 
-	char last_msisdn[GSM_EXTENSION_LENGTH+1];
+	char last_msisdn[VLR_MSISDN_LENGTH+1];
 };
 
 static int sms_subscr_cb(unsigned int, unsigned int, void *, void *);
diff --git a/tests/sms_queue/sms_queue_test.c b/tests/sms_queue/sms_queue_test.c
index e9443e0..b31824b 100644
--- a/tests/sms_queue/sms_queue_test.c
+++ b/tests/sms_queue/sms_queue_test.c
@@ -24,6 +24,7 @@
 #include <osmocom/core/application.h>
 
 #include <osmocom/msc/vlr.h>
+#include <osmocom/msc/gsm_data.h>
 
 static void *talloc_ctx = NULL;
 
@@ -128,7 +129,7 @@
 static void test_next_sms()
 {
 	int i;
-	char last_msisdn[GSM_EXTENSION_LENGTH+1] = "";
+	char last_msisdn[VLR_MSISDN_LENGTH+1] = "";
 
 	printf("Testing smsq_take_next_sms()\n");
 

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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iab5c507ec04fc2884187cf946f6ae2240e4a31f8
Gerrit-Change-Number: 12036
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181130/5dbfbfb8/attachment.htm>


More information about the gerrit-log mailing list