aboutsummaryrefslogtreecommitdiffstats
path: root/asn1
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2008-09-27 14:16:55 +0000
committerAnders Broman <anders.broman@ericsson.com>2008-09-27 14:16:55 +0000
commit3a26e893623658981bc8c22860f513faad738747 (patch)
treec076e875d86e659acbb2eec1697255df0d00b8a2 /asn1
parent69336f7d96e4939e5645926c912151b325f365ea (diff)
From Reinhard(rspmn):
Wrong display of USSD strings in the GSM 7-bit alphabet for non-ASCII data svn path=/trunk/; revision=26286
Diffstat (limited to 'asn1')
-rw-r--r--asn1/gsmmap/gsmmap.cnf16
1 files changed, 9 insertions, 7 deletions
diff --git a/asn1/gsmmap/gsmmap.cnf b/asn1/gsmmap/gsmmap.cnf
index 471300a223..0202674671 100644
--- a/asn1/gsmmap/gsmmap.cnf
+++ b/asn1/gsmmap/gsmmap.cnf
@@ -418,8 +418,10 @@ actx->pinfo->p2p_dir = P2P_DIR_RECV;
guint8 out_len;
/* XXX - The maximum item label length is 240. Does this really need to be 1024?
* use ep_alloc ?
+ * We need a input and an output buffer to gsm_sms_char_ascii_decode()
*/
- static unsigned char bigbuf[1024];
+ static unsigned char msgbuf[1024];
+ static unsigned char outbuf[1024];
gchar *utf8_text = NULL;
GIConv cd;
GError *l_conv_error = NULL;
@@ -432,14 +434,14 @@ actx->pinfo->p2p_dir = P2P_DIR_RECV;
switch(sms_encoding){
case SMS_ENCODING_7BIT:
case SMS_ENCODING_7BIT_LANG:
- out_len = gsm_sms_char_7bit_unpack(0, length, sizeof(bigbuf),
+ out_len = gsm_sms_char_7bit_unpack(0, length, sizeof(msgbuf),
tvb_get_ptr(parameter_tvb, 0, length),
- bigbuf);
+ msgbuf);
- bigbuf[out_len] = '\0';
- gsm_sms_char_ascii_decode(bigbuf, bigbuf, out_len);
- bigbuf[1023] = '\0';
- proto_tree_add_text(tree, parameter_tvb, 0, length, "USSD String: %%s", bigbuf);
+ msgbuf[out_len] = '\0';
+ gsm_sms_char_ascii_decode(outbuf, msgbuf, out_len);
+ msgbuf[1023] = '\0';
+ proto_tree_add_text(tree, parameter_tvb, 0, length, "USSD String: %%s", outbuf);
break;
case SMS_ENCODING_8BIT:
proto_tree_add_text(tree, parameter_tvb , 0, length, "USSD String: %%s", tvb_get_ptr(parameter_tvb, 0, length));