Review at  https://gerrit.osmocom.org/5840

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
---
M src/gsm/gsm0480.c
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/40/5840/1

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:

-- 
To view, visit https://gerrit.osmocom.org/5840
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib8fc1f6bae472b0b264b6158f372b6cce255b222
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy <axilira...@gmail.com>

Reply via email to