summaryrefslogtreecommitdiffstats
path: root/src/gsm/gsm0480.c
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2018-01-17 12:28:40 +0600
committerHarald Welte <laforge@gnumonks.org>2018-01-17 10:45:41 +0000
commit3cafc060142e256cf9f9ae4a6362c248c8e1fb95 (patch)
tree36ec719ad2f39bad5b890ad6b0671d69714073ed /src/gsm/gsm0480.c
parentb92a27f6944b7fa6f9297a5588b2d9177aa3728b (diff)
gsm0480: parse optional IEs for RELEASE COMPLETE message
According to GSM 04.80 section 2.5 "Release complete", a message of the mentioned type may contain optional IEs, such as Cause and Facility. Let's parse them. Change-Id: Ib8fc1f6bae472b0b264b6158f372b6cce255b222
Diffstat (limited to 'src/gsm/gsm0480.c')
-rw-r--r--src/gsm/gsm0480.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gsm/gsm0480.c b/src/gsm/gsm0480.c
index 0f302502..0072812d 100644
--- a/src/gsm/gsm0480.c
+++ b/src/gsm/gsm0480.c
@@ -295,7 +295,11 @@ static int parse_ss(const struct gsm48_hdr *hdr, uint16_t len, struct ss_request
switch (msg_type) {
case GSM0480_MTYPE_RELEASE_COMPLETE:
LOGP(0, LOGL_DEBUG, "SS Release Complete\n");
- /* could also parse out the optional Cause/Facility data */
+
+ /* Parse optional Cause and/or Facility data */
+ if (len >= 2)
+ rc &= parse_ss_info_elements(&hdr->data[0], len, req);
+
req->ussd_text[0] = 0xFF;
break;
case GSM0480_MTYPE_REGISTER: