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
This commit is contained in:
Guy Harris 2014-01-22 20:29:47 +00:00
parent 2019647757
commit dd8cf3de90
1 changed files with 10 additions and 2 deletions

View File

@ -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);