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-hdfsdata.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-hdfsdata.c')
-rw-r--r-- | epan/dissectors/packet-hdfsdata.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/epan/dissectors/packet-hdfsdata.c b/epan/dissectors/packet-hdfsdata.c index b940caac72..9debc7ee33 100644 --- a/epan/dissectors/packet-hdfsdata.c +++ b/epan/dissectors/packet-hdfsdata.c @@ -162,7 +162,7 @@ dissect_variable_int_string(tvbuff_t *tvb, proto_tree *hdfsdata_tree, int *offse int len = dissect_variable_length_long (tvb, hdfsdata_tree, offset); /* client id = amount of bytes in previous */ - proto_tree_add_item(hdfsdata_tree, hf_hdfsdata_clientid, tvb, *offset, len, ENC_BIG_ENDIAN); + proto_tree_add_item(hdfsdata_tree, hf_hdfsdata_clientid, tvb, *offset, len, ENC_ASCII|ENC_NA); *offset += len; } @@ -178,7 +178,7 @@ dissect_access_tokens(tvbuff_t *tvb, proto_tree *hdfsdata_tree, int *offset) *offset += 1; /* token id = amount of bytes in previous */ - proto_tree_add_item(hdfsdata_tree, hf_hdfsdata_tokenid, tvb, *offset, len, ENC_BIG_ENDIAN); + proto_tree_add_item(hdfsdata_tree, hf_hdfsdata_tokenid, tvb, *offset, len, ENC_ASCII|ENC_NA); *offset += len; len = tvb_get_guint8(tvb, *offset); @@ -186,7 +186,7 @@ dissect_access_tokens(tvbuff_t *tvb, proto_tree *hdfsdata_tree, int *offset) *offset += 1; /* token password = amount of bytes in previous */ - proto_tree_add_item(hdfsdata_tree, hf_hdfsdata_tokenpassword, tvb, *offset, len, ENC_BIG_ENDIAN); + proto_tree_add_item(hdfsdata_tree, hf_hdfsdata_tokenpassword, tvb, *offset, len, ENC_ASCII|ENC_NA); *offset += len; len = tvb_get_guint8(tvb, *offset); @@ -194,7 +194,7 @@ dissect_access_tokens(tvbuff_t *tvb, proto_tree *hdfsdata_tree, int *offset) *offset += 1; /* token type = amount of bytes in previous */ - proto_tree_add_item(hdfsdata_tree, hf_hdfsdata_tokentype, tvb, *offset, len, ENC_BIG_ENDIAN); + proto_tree_add_item(hdfsdata_tree, hf_hdfsdata_tokentype, tvb, *offset, len, ENC_ASCII|ENC_NA); *offset += len; len = tvb_get_guint8(tvb, *offset); @@ -202,7 +202,7 @@ dissect_access_tokens(tvbuff_t *tvb, proto_tree *hdfsdata_tree, int *offset) *offset += 1; /* token service = amount of bytes in previous; */ - proto_tree_add_item(hdfsdata_tree, hf_hdfsdata_tokenservice, tvb, *offset, len, ENC_BIG_ENDIAN); + proto_tree_add_item(hdfsdata_tree, hf_hdfsdata_tokenservice, tvb, *offset, len, ENC_ASCII|ENC_NA); *offset += len; } @@ -369,7 +369,7 @@ dissect_write_response(tvbuff_t *tvb, proto_tree *hdfsdata_tree, int offset) offset += 8; /* add the rest -> RESPONSE_DATA */ - proto_tree_add_item(hdfsdata_tree, hf_hdfsdata_rest, tvb, offset, (tvb_reported_length(tvb)) - offset, ENC_BIG_ENDIAN); + proto_tree_add_item(hdfsdata_tree, hf_hdfsdata_rest, tvb, offset, (tvb_reported_length(tvb)) - offset, ENC_ASCII|ENC_NA); /* offset += (tvb_reported_length(tvb)); */ } @@ -436,7 +436,7 @@ dissect_hdfsdata_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* This message just contains data so we can display it all as one block */ - proto_tree_add_item(hdfsdata_tree, hf_hdfsdata_rest, tvb, offset, (tvb_reported_length(tvb)) - offset, ENC_BIG_ENDIAN); + proto_tree_add_item(hdfsdata_tree, hf_hdfsdata_rest, tvb, offset, (tvb_reported_length(tvb)) - offset, ENC_ASCII|ENC_NA); } else { @@ -474,7 +474,7 @@ dissect_hdfsdata_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } else { /* This message contains some form of data that we have not successfully been able to pattern match and catagorize. Display all of it as data. */ - proto_tree_add_item(hdfsdata_tree, hf_hdfsdata_rest, tvb, offset, (tvb_reported_length(tvb)), ENC_BIG_ENDIAN); + proto_tree_add_item(hdfsdata_tree, hf_hdfsdata_rest, tvb, offset, (tvb_reported_length(tvb)), ENC_ASCII|ENC_NA); } } } |