From 3cafc060142e256cf9f9ae4a6362c248c8e1fb95 Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Wed, 17 Jan 2018 12:28:40 +0600 Subject: 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 --- src/gsm/gsm0480.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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: -- cgit v1.2.3