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
diff --git a/src/gsm/gsm0480.c b/src/gsm/gsm0480.c
index 0f30250..0072812 100644
--- a/src/gsm/gsm0480.c
+++ b/src/gsm/gsm0480.c
@@ -295,7 +295,11 @@
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: