diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-07-29 04:17:37 +0800 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-07-29 04:33:35 +0800 |
commit | 1230b3c02e6f460a764a3ab63f7befc7e18b4683 (patch) | |
tree | ca891c64acad68217f93360b94ac7b27f18389dc | |
parent | 6d2d523e77ef46f2a19095cfa5c726e3681f739c (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.
Conflicts:
openbsc/src/vty_interface_layer3.c
-rw-r--r-- | openbsc/include/openbsc/gsm_04_80.h | 1 | ||||
-rw-r--r-- | openbsc/src/gsm_04_80.c | 18 |
2 files changed, 19 insertions, 0 deletions
diff --git a/openbsc/include/openbsc/gsm_04_80.h b/openbsc/include/openbsc/gsm_04_80.h index 63262ea18..98f8abf09 100644 --- a/openbsc/include/openbsc/gsm_04_80.h +++ b/openbsc/include/openbsc/gsm_04_80.h @@ -26,5 +26,6 @@ int gsm0480_wrap_invoke(struct msgb *msg, int op, int link_id); int gsm0480_wrap_facility(struct msgb *msg); int gsm0480_send_ussdNotify(struct gsm_lchan *lchan, const char *text); +int gsm0480_send_releaseComplete(struct gsm_lchan *lchan); #endif diff --git a/openbsc/src/gsm_04_80.c b/openbsc/src/gsm_04_80.c index 4273ad6eb..99f25a05f 100644 --- a/openbsc/src/gsm_04_80.c +++ b/openbsc/src/gsm_04_80.c @@ -475,3 +475,21 @@ int gsm0480_send_ussdNotify(struct gsm_lchan *lchan, const char *text) return gsm48_sendmsg(msg, NULL); } + +int gsm0480_send_releaseComplete(struct gsm_lchan *lchan) +{ + struct gsm48_hdr *gh; + struct msgb *msg; + + msg = gsm48_msgb_alloc(); + if (!msg) + return -1; + + msg->lchan = lchan; + + gh = (struct gsm48_hdr *) msgb_push(msg, sizeof(*gh)); + gh->proto_discr = GSM48_PDISC_NC_SS; + gh->msg_type = GSM0480_MTYPE_RELEASE_COMPLETE; + + return gsm48_sendmsg(msg, NULL); +} |