summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-12-26 22:17:45 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-12-26 22:17:45 +0100
commit1f229b344e146e29647c196db8ab816c4be65004 (patch)
treeb761e3b93604e2460fe0889b37f2c76108c039a4
parentc9763a3de45fc70a889298494a68bd5526d0ee82 (diff)
ussd: Move to use gsm_7bit_encode_n_ussd for USSD encoding
The legacy functions have a bad/wrong return value for the number of septets in the string. Change the code to use the new functions which will fix encoding issues as well.
-rw-r--r--openbsc/src/libmsc/gsm_04_80.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsc/src/libmsc/gsm_04_80.c b/openbsc/src/libmsc/gsm_04_80.c
index 39738a5ee..b30f9ee5f 100644
--- a/openbsc/src/libmsc/gsm_04_80.c
+++ b/openbsc/src/libmsc/gsm_04_80.c
@@ -72,7 +72,7 @@ int gsm0480_send_ussd_response(struct gsm_subscriber_connection *conn,
/* First put the payload text into the message */
ptr8 = msgb_put(msg, 0);
- response_len = gsm_7bit_encode(ptr8, response_text);
+ gsm_7bit_encode_n_ussd(ptr8, msgb_tailroom(msg), response_text, &response_len);
msgb_put(msg, response_len);
/* Then wrap it as an Octet String */