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-tds.c | |
parent | 4c9bb81ad7b0f609fa236c808a1ab9ef6cab5a79 (diff) |
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-tds.c')
-rw-r--r-- | epan/dissectors/packet-tds.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-tds.c b/epan/dissectors/packet-tds.c index 640b955ca6..a4c3b5a78b 100644 --- a/epan/dissectors/packet-tds.c +++ b/epan/dissectors/packet-tds.c @@ -1861,7 +1861,7 @@ dissect_tds_type_varbyte(tvbuff_t *tvb, guint *offset, packet_info *pinfo, proto proto_tree_add_item(sub_tree, hf_tds_type_varbyte_data_bytes, tvb, *offset, length, ENC_NA); break; case TDS_DATA_TYPE_BIGVARCHR: /* VarChar */ - proto_tree_add_item(sub_tree, hf_tds_type_varbyte_data_string, tvb, *offset, length, TRUE); + proto_tree_add_item(sub_tree, hf_tds_type_varbyte_data_string, tvb, *offset, length, ENC_ASCII|ENC_NA); break; case TDS_DATA_TYPE_NVARCHAR: /* NVarChar */ string_value = tvb_get_ephemeral_faked_unicode(tvb, *offset, length / 2, TRUE); @@ -2014,7 +2014,7 @@ dissect_tds_type_varbyte(tvbuff_t *tvb, guint *offset, packet_info *pinfo, proto break; case TDS_DATA_TYPE_BIGVARCHR: /* VarChar */ case TDS_DATA_TYPE_BIGCHAR: /* Char */ - proto_tree_add_item(sub_tree, hf_tds_type_varbyte_data_string, tvb, *offset, length, TRUE); + proto_tree_add_item(sub_tree, hf_tds_type_varbyte_data_string, tvb, *offset, length, ENC_ASCII|ENC_NA); break; case TDS_DATA_TYPE_NVARCHAR: /* NVarChar */ case TDS_DATA_TYPE_NCHAR: /* NChar */ @@ -2082,7 +2082,7 @@ dissect_tds_rpc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) case TDS_PROTOCOL_4: len = tvb_get_guint8(tvb, offset); proto_tree_add_item(tree, hf_tds_rpc_name_length8, tvb, offset, 1, ENC_LITTLE_ENDIAN); - proto_tree_add_item(tree, hf_tds_rpc_name, tvb, offset + 1, len, TRUE); + proto_tree_add_item(tree, hf_tds_rpc_name, tvb, offset + 1, len, ENC_ASCII|ENC_NA); offset += 1 + len; break; |