summaryrefslogtreecommitdiffstats
path: root/openbsc/src/libmsc/gsm_04_11.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-12-26 22:33:02 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-12-26 22:33:02 +0100
commit91acfa072016e716b83d563c621233edc87c31cc (patch)
treeba2a3e7c306a76361aacd99d65f1fc940fcf7468 /openbsc/src/libmsc/gsm_04_11.c
parent1f229b344e146e29647c196db8ab816c4be65004 (diff)
sms: Move to gsm_7bit_encode_n in the sms sending code
Do not rely on the potential wrong gsm_7bit_encode result but use gsm_7bit_encode_n with maximum available space.
Diffstat (limited to 'openbsc/src/libmsc/gsm_04_11.c')
-rw-r--r--openbsc/src/libmsc/gsm_04_11.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/openbsc/src/libmsc/gsm_04_11.c b/openbsc/src/libmsc/gsm_04_11.c
index e554b74..19b6030 100644
--- a/openbsc/src/libmsc/gsm_04_11.c
+++ b/openbsc/src/libmsc/gsm_04_11.c
@@ -106,7 +106,8 @@ struct gsm_sms *sms_from_text(struct gsm_subscriber *receiver,
sms->data_coding_scheme = dcs;
strncpy(sms->dst.addr, receiver->extension, sizeof(sms->dst.addr)-1);
/* Generate user_data */
- sms->user_data_len = gsm_7bit_encode(sms->user_data, sms->text);
+ sms->user_data_len = gsm_7bit_encode_n(sms->user_data, sizeof(sms->user_data),
+ sms->text, NULL);
return sms;
}