diff options
author | Harald Welte <laforge@gnumonks.org> | 2016-04-20 17:50:17 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2016-04-29 13:10:37 +0200 |
commit | d3fa84dbba3b67cdbe2d8c789b2833b5ddf42068 (patch) | |
tree | 6d50bb33ac683624f4c861468ce01d1e9743bf9d /openbsc/src/gprs | |
parent | 53373bca8f9fe79ca981f9fc1ef644586bd5c3b2 (diff) |
use new libosmocore gsm_23_003.h for IMEI/IMSI length
... rather than our private definitions everwhere. As an added benefit,
gprs_gsup_messages.h is now free of any header dependencies within
openbsc.
Diffstat (limited to 'openbsc/src/gprs')
-rw-r--r-- | openbsc/src/gprs/gprs_gsup_messages.c | 1 | ||||
-rw-r--r-- | openbsc/src/gprs/gprs_subscriber.c | 5 | ||||
-rw-r--r-- | openbsc/src/gprs/gtphub_ares.c | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/openbsc/src/gprs/gprs_gsup_messages.c b/openbsc/src/gprs/gprs_gsup_messages.c index 0b1dc9b00..b3c8dab5f 100644 --- a/openbsc/src/gprs/gprs_gsup_messages.c +++ b/openbsc/src/gprs/gprs_gsup_messages.c @@ -31,6 +31,7 @@ #include <osmocom/gsm/tlv.h> #include <osmocom/core/msgb.h> +#include <osmocom/gsm/gsm48_ie.h> #include <stdint.h> diff --git a/openbsc/src/gprs/gprs_subscriber.c b/openbsc/src/gprs/gprs_subscriber.c index 5b0bf398c..648f91204 100644 --- a/openbsc/src/gprs/gprs_subscriber.c +++ b/openbsc/src/gprs/gprs_subscriber.c @@ -757,8 +757,9 @@ struct gsm_subscriber *gprs_subscr_get_or_create_by_mmctx(struct sgsn_mm_ctx *mm } if (strcpy(subscr->equipment.imei, mmctx->imei) != 0) { - strncpy(subscr->equipment.imei, mmctx->imei, GSM_IMEI_LENGTH-1); - subscr->equipment.imei[GSM_IMEI_LENGTH-1] = 0; + strncpy(subscr->equipment.imei, mmctx->imei, + sizeof(subscr->equipment.imei)-1); + subscr->equipment.imei[sizeof(subscr->equipment.imei)-1] = 0; } if (subscr->lac != mmctx->ra.lac) diff --git a/openbsc/src/gprs/gtphub_ares.c b/openbsc/src/gprs/gtphub_ares.c index 947f2ddd5..667013b8b 100644 --- a/openbsc/src/gprs/gtphub_ares.c +++ b/openbsc/src/gprs/gtphub_ares.c @@ -55,7 +55,7 @@ struct ggsn_lookup { struct gtphub *hub; - char imsi_str[GSM_IMSI_LENGTH]; + char imsi_str[GSM23003_IMSI_MAX_DIGITS+1]; char apn_ni_str[GSM_APN_LENGTH]; char apn_oi_str[GSM_APN_LENGTH]; int have_3dig_mnc; |