diff options
author | Bill Meier <wmeier@newsguy.com> | 2011-10-15 18:46:26 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2011-10-15 18:46:26 +0000 |
commit | 126aa8539380e6b0b465b48d30f349b76afdc489 (patch) | |
tree | 16b43738b14751d74a8ca8e4de803ba0b6c87196 /epan/dissectors/packet-vnc.c | |
parent | 4c9bb81ad7b0f609fa236c808a1ab9ef6cab5a79 (diff) | |
download | wireshark-126aa8539380e6b0b465b48d30f349b76afdc489.tar.gz wireshark-126aa8539380e6b0b465b48d30f349b76afdc489.tar.bz2 wireshark-126aa8539380e6b0b465b48d30f349b76afdc489.zip |
Convert proto_tree_add_item() 'encoding' arg for field types FT_STRING, FT_STRINGZ, FT_UINT_STRING as follows:
1. If there's no character encoding (ENC_ASCII, ...) specified
then use ENC_ASCII.
2. For all but FT_UINT_STRING, always use ENC_NA
(replacing any existing True/1/FALSE/0
/ENC_BIG_ENDIAN/ENC_LITTLE_ENDIAN).
svn path=/trunk/; revision=39426
Diffstat (limited to 'epan/dissectors/packet-vnc.c')
-rw-r--r-- | epan/dissectors/packet-vnc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/epan/dissectors/packet-vnc.c b/epan/dissectors/packet-vnc.c index bac63631f1..b28b9d1522 100644 --- a/epan/dissectors/packet-vnc.c +++ b/epan/dissectors/packet-vnc.c @@ -794,7 +794,7 @@ vnc_startup_messages(tvbuff_t *tvb, packet_info *pinfo, gint offset, return TRUE; /* we still hope to get a SERVER_VERSION message some day. Do not proceed yet */ proto_tree_add_item(tree, hf_vnc_server_proto_ver, tvb, 4, - 7, FALSE); + 7, ENC_ASCII|ENC_NA); per_conversation_info->server_proto_ver = g_ascii_strtod((char *)tvb_get_ephemeral_string(tvb, 4, 7), NULL); per_conversation_info->server_port = pinfo->srcport; @@ -812,7 +812,7 @@ vnc_startup_messages(tvbuff_t *tvb, packet_info *pinfo, gint offset, return TRUE; /* we still hope to get a CLIENT_VERSION message some day. Do not proceed yet */ proto_tree_add_item(tree, hf_vnc_client_proto_ver, tvb, - 4, 7, FALSE); + 4, 7, ENC_ASCII|ENC_NA); per_conversation_info->client_proto_ver = g_ascii_strtod((char *)tvb_get_ephemeral_string(tvb, 4, 7), NULL); @@ -1104,7 +1104,7 @@ vnc_startup_messages(tvbuff_t *tvb, packet_info *pinfo, gint offset, offset += 4; proto_tree_add_item(tree, hf_vnc_auth_error, tvb, - offset, text_len, FALSE); + offset, text_len, ENC_ASCII|ENC_NA); } return TRUE; /* All versions: Do not continue @@ -1192,7 +1192,7 @@ vnc_startup_messages(tvbuff_t *tvb, packet_info *pinfo, gint offset, proto_tree_add_item(tree, hf_vnc_desktop_name, tvb, offset, desktop_name_len, - FALSE); + ENC_ASCII|ENC_NA); } if(per_conversation_info->tight_enabled == TRUE) @@ -1576,7 +1576,7 @@ vnc_client_cut_text(tvbuff_t *tvb, packet_info *pinfo, gint *offset, *offset += 4; proto_tree_add_item(tree, hf_vnc_client_cut_text, tvb, *offset, - text_len, FALSE); + text_len, ENC_ASCII|ENC_NA); *offset += text_len; } @@ -2484,7 +2484,7 @@ vnc_server_cut_text(tvbuff_t *tvb, packet_info *pinfo, gint *offset, VNC_BYTES_NEEDED(text_len); proto_tree_add_item(tree, hf_vnc_server_cut_text, tvb, *offset, - text_len, FALSE); + text_len, ENC_ASCII|ENC_NA); *offset += text_len; return *offset; |