aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-07-27 03:31:50 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-07-27 03:31:50 +0800
commit68d26796ca2b01ff7b7704c952b5f43bf9989d7b (patch)
tree61271f11e7e38de99d1a1581f9e58b5a39b79b1a /openbsc/src
parente6373b7f632487cc0cedd42d6b5d1bc9ef71cbfc (diff)
gsm_04_80: Send a Release Complete otherwise the USSD unit stays BUSY
We need to release the USSD unit, otherwise it is staying blocked and will stop to function (even across LUs on my a1200). This code should encode the transaction and the direction depending on the network state but this is omitted right now.
Diffstat (limited to 'openbsc/src')
-rw-r--r--openbsc/src/gsm_04_80.c16
-rw-r--r--openbsc/src/vty_interface_layer3.c1
2 files changed, 17 insertions, 0 deletions
diff --git a/openbsc/src/gsm_04_80.c b/openbsc/src/gsm_04_80.c
index 28f9b9215..a49c8b565 100644
--- a/openbsc/src/gsm_04_80.c
+++ b/openbsc/src/gsm_04_80.c
@@ -469,3 +469,19 @@ int gsm0480_send_ussdNotify(struct gsm_subscriber_connection *conn, const char *
return gsm0808_submit_dtap(conn, msg, 0);
}
+
+int gsm0480_send_releaseComplete(struct gsm_subscriber_connection *conn)
+{
+ struct gsm48_hdr *gh;
+ struct msgb *msg;
+
+ msg = gsm48_msgb_alloc();
+ if (!msg)
+ return -1;
+
+ gh = (struct gsm48_hdr *) msgb_push(msg, sizeof(*gh));
+ gh->proto_discr = GSM48_PDISC_NC_SS;
+ gh->msg_type = GSM0480_MTYPE_RELEASE_COMPLETE;
+
+ return gsm0808_submit_dtap(conn, msg, 0);
+}
diff --git a/openbsc/src/vty_interface_layer3.c b/openbsc/src/vty_interface_layer3.c
index 34e61bb5b..b775af139 100644
--- a/openbsc/src/vty_interface_layer3.c
+++ b/openbsc/src/vty_interface_layer3.c
@@ -408,6 +408,7 @@ DEFUN(subscriber_ussd_notify,
}
gsm0480_send_ussdNotify(conn, text);
+ gsm0480_send_releaseComplete(conn);
subscr_put(subscr);
talloc_free(text);