[PATCH] ussd: Fix test for RELEASE COMPLETE

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Alexander Huemer alexander.huemer at xx.vu
Sun Oct 6 19:59:28 UTC 2013


A correcsponding change in libosmocore sets text[0] to '\0'.
The test for 0xFF could never have been true.
---
 openbsc/src/libmsc/ussd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/openbsc/src/libmsc/ussd.c b/openbsc/src/libmsc/ussd.c
index 76ee101..b413c83 100644
--- a/openbsc/src/libmsc/ussd.c
+++ b/openbsc/src/libmsc/ussd.c
@@ -51,7 +51,7 @@ int handle_rcv_ussd(struct gsm_subscriber_connection *conn, struct msgb *msg)
 	memset(&req, 0, sizeof(req));
 	gh = msgb_l3(msg);
 	rc = gsm0480_decode_ussd_request(gh, msgb_l3len(msg), &req);
-	if (req.text[0] == 0xFF)  /* Release-Complete */
+	if (req.text[0] == '\0')  /* Release-Complete */
 		return 0;
 
 	if (!strcmp(USSD_TEXT_OWN_NUMBER, (const char *)req.text)) {
-- 
1.8.3.2




More information about the OpenBSC mailing list