aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-alcap.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-01-22 20:29:47 +0000
committerGuy Harris <guy@alum.mit.edu>2014-01-22 20:29:47 +0000
commitdd8cf3de9012b57ffd56656cc57ce033ee3274f7 (patch)
treee54f82206a8e146b49788fc93fa8a880f56035da /epan/dissectors/packet-alcap.c
parent2019647757c9fd5f864a0041796e9623181a961c (diff)
Use tvb_get_string_enc(), and assume ASCII for E.164 addresses. (I must
be misreading Q.2630.3, as it seems to indicate that the addresses are BCD, not ASCII, speaking as it does of "hexadecimal digit[s] of address[es]". svn path=/trunk/; revision=54909
Diffstat (limited to 'epan/dissectors/packet-alcap.c')
-rw-r--r--epan/dissectors/packet-alcap.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/epan/dissectors/packet-alcap.c b/epan/dissectors/packet-alcap.c
index 4f634db195..2e7b44aa62 100644
--- a/epan/dissectors/packet-alcap.c
+++ b/epan/dissectors/packet-alcap.c
@@ -544,7 +544,11 @@ static const gchar* dissect_fields_desea(packet_info* pinfo _U_, tvbuff_t *tvb,
e164->e164_number_type = CALLED_PARTY_NUMBER;
e164->nature_of_address = tvb_get_guint8(tvb,offset) & 0x7f;
- e164->E164_number_str = (gchar*)tvb_get_string(wmem_packet_scope(),tvb,offset+1,len);
+ /*
+ * XXX - section 7.4.14 "E.164 address" of Q.2630.3 seems to
+ * indicate that this is BCD, not ASCII.
+ */
+ e164->E164_number_str = (gchar*)tvb_get_string_enc(wmem_packet_scope(),tvb,offset+1,len,ENC_ASCII|ENC_NA);
e164->E164_number_length = len-1;
dissect_e164_number(tvb, tree, offset-1, len, *e164);
@@ -570,7 +574,11 @@ static const gchar* dissect_fields_oesea(packet_info* pinfo _U_, tvbuff_t *tvb,
e164->e164_number_type = CALLING_PARTY_NUMBER;
e164->nature_of_address = tvb_get_guint8(tvb,offset) & 0x7f;
- e164->E164_number_str = (gchar*)tvb_get_string(wmem_packet_scope(),tvb,offset+1,len);
+ /*
+ * XXX - section 7.4.14 "E.164 address" of Q.2630.3 seems to
+ * indicate that this is BCD, not ASCII.
+ */
+ e164->E164_number_str = (gchar*)tvb_get_string_enc(wmem_packet_scope(),tvb,offset+1,len,ENC_ASCII|ENC_NA);
e164->E164_number_length = len-1;
dissect_e164_number(tvb, tree, offset-1, len, *e164);