From 8b0737fa71ea4b04cee8dc61c79a1f93779e66dc Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Sat, 25 May 2019 19:27:17 +0700 Subject: Use GSM23003_MSISDN_MAX_DIGITS from libosmogsm Change-Id: If9eb46b83b6ad45f210b86b46dd416352adcc3ff Depends on: Idc74f4d94ad44b9fc1b6d43178f5f33d551ebfb1 --- src/libmsc/msc_t.c | 4 ++-- src/libmsc/sms_queue.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/libmsc/msc_t.c b/src/libmsc/msc_t.c index 8eefccc71..6b96c26ca 100644 --- a/src/libmsc/msc_t.c +++ b/src/libmsc/msc_t.c @@ -75,7 +75,7 @@ static int msc_t_assign_handover_number(struct msc_t *msc_t) int rc; uint64_t started_at; uint64_t ho_nr; - char ho_nr_str[VLR_MSISDN_LENGTH+1]; + char ho_nr_str[GSM23003_MSISDN_MAX_DIGITS+1]; struct gsm_network *net = msc_t_net(msc_t); bool usable = false; @@ -417,7 +417,7 @@ static int msc_t_patch_and_send_ho_request_ack(struct msc_t *msc_t, const struct struct rtp_stream *rtp_cn = msc_t->inter_msc.call_leg? msc_t->inter_msc.call_leg->rtp[RTP_TO_CN] : NULL; /* Since it's BCD, it needs rounded-up half the char* length of an MSISDN plus a type byte. * But no need to introduce obscure math to save a few stack bytes, just have more. */ - uint8_t msisdn_enc_buf[VLR_MSISDN_LENGTH + 1]; + uint8_t msisdn_enc_buf[GSM23003_MSISDN_MAX_DIGITS+1]; /* Copy an_apdu and an_apdu->e_info in "copy-on-write" method, because they are const and we * need to add the Handover Number to e_info. */ const struct ran_handover_request_ack *r = &ran_dec->handover_request_ack; diff --git a/src/libmsc/sms_queue.c b/src/libmsc/sms_queue.c index 2c380b294..6346c1d43 100644 --- a/src/libmsc/sms_queue.c +++ b/src/libmsc/sms_queue.c @@ -66,7 +66,7 @@ struct gsm_sms_queue { struct llist_head pending_sms; - char last_msisdn[VLR_MSISDN_LENGTH+1]; + char last_msisdn[GSM23003_MSISDN_MAX_DIGITS+1]; }; static int sms_subscr_cb(unsigned int, unsigned int, void *, void *); -- cgit v1.2.3