aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs/gprs_gsup_messages.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-04-22 23:09:41 -0400
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-05-05 21:08:00 +0200
commitb927f1c3199b48becb03c0d56926c3b98d6ff5ce (patch)
treecb81e76fdc35d7a16247ec2390f2f7838bad4a83 /openbsc/src/gprs/gprs_gsup_messages.c
parent02d8c472bdff0a085cbedd9d902f7ced29e5d712 (diff)
gsup: Extract the new MSISDN string
Extract the new MSISDN IE from the GSUP message and verify that it is read/written to the message.
Diffstat (limited to 'openbsc/src/gprs/gprs_gsup_messages.c')
-rw-r--r--openbsc/src/gprs/gprs_gsup_messages.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/openbsc/src/gprs/gprs_gsup_messages.c b/openbsc/src/gprs/gprs_gsup_messages.c
index 9d9b6be20..56f78fd12 100644
--- a/openbsc/src/gprs/gprs_gsup_messages.c
+++ b/openbsc/src/gprs/gprs_gsup_messages.c
@@ -2,6 +2,7 @@
/*
* (C) 2014 by Sysmocom s.f.m.c. GmbH
+ * (C) 2015 by Holger Hans Peter Freyther
* All Rights Reserved
*
* Author: Jacob Erlbeck
@@ -291,6 +292,12 @@ int gprs_gsup_decode(const uint8_t *const_data, size_t data_len,
gsup_msg->auth_tuples[gsup_msg->num_auth_tuples++] =
auth_info;
break;
+
+ case GPRS_GSUP_MSISDN_IE:
+ gsup_msg->msisdn_enc = value;
+ gsup_msg->msisdn_enc_len = value_len;
+ break;
+
default:
LOGP(DGPRS, LOGL_NOTICE,
"GSUP IE type %d unknown\n", iei);
@@ -374,6 +381,10 @@ void gprs_gsup_encode(struct msgb *msg, const struct gprs_gsup_message *gsup_msg
msgb_tlv_put(msg, GPRS_GSUP_IMSI_IE, bcd_len - 1, &bcd_buf[1]);
/* specific parts */
+ if (gsup_msg->msisdn_enc)
+ msgb_tlv_put(msg, GPRS_GSUP_MSISDN_IE,
+ gsup_msg->msisdn_enc_len, gsup_msg->msisdn_enc);
+
if ((u8 = gsup_msg->cause))
msgb_tlv_put(msg, GPRS_GSUP_CAUSE_IE, sizeof(u8), &u8);