aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/include/openbsc/gsm_subscriber.h
diff options
context:
space:
mode:
authorMike Haben <michael.haben@btinternet.com>2009-10-26 20:36:34 +0100
committerHarald Welte <laforge@gnumonks.org>2009-10-26 20:39:26 +0100
commit2449b37dfe424248ea9fe2143efb78a3cd385d64 (patch)
treee9b939fed62cc7b978fbb5477aea2169001587e8 /openbsc/include/openbsc/gsm_subscriber.h
parentdc329a6cdb204d89c15599ca606e239dde368e7f (diff)
[USSD] various USSD improvements
- Improved handling of extension-number string (as per review) - Guard against a buffer-overflow if mobile sends a too-long USSD - declare some function-parameters const - fix gsm_ts_name function to display the right BTS number (bts->nr rather than bts->bts_nr)
Diffstat (limited to 'openbsc/include/openbsc/gsm_subscriber.h')
-rw-r--r--openbsc/include/openbsc/gsm_subscriber.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/openbsc/include/openbsc/gsm_subscriber.h b/openbsc/include/openbsc/gsm_subscriber.h
index ea70c3aa2..d612ed566 100644
--- a/openbsc/include/openbsc/gsm_subscriber.h
+++ b/openbsc/include/openbsc/gsm_subscriber.h
@@ -8,13 +8,14 @@
#define GSM_IMEI_LENGTH 17
#define GSM_IMSI_LENGTH 17
#define GSM_NAME_LENGTH 128
-#define GSM_EXTENSION_LENGTH 128
+
+#define GSM_EXTENSION_LENGTH 15 /* MSISDN can only be 15 digits length */
+#define GSM_MIN_EXTEN 20000
+#define GSM_MAX_EXTEN 49999
/* reserved according to GSM 03.03 ยง 2.4 */
#define GSM_RESERVED_TMSI 0xFFFFFFFF
-#define GSM_MIN_EXTEN 20000
-#define GSM_MAX_EXTEN 49999
#define GSM_SUBSCRIBER_FIRST_CONTACT 0x00000001
#define tmsi_from_string(str) strtoul(str, NULL, 10)