aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-tftp.c
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2011-10-15 18:46:26 +0000
committerBill Meier <wmeier@newsguy.com>2011-10-15 18:46:26 +0000
commit126aa8539380e6b0b465b48d30f349b76afdc489 (patch)
tree16b43738b14751d74a8ca8e4de803ba0b6c87196 /epan/dissectors/packet-tftp.c
parent4c9bb81ad7b0f609fa236c808a1ab9ef6cab5a79 (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-tftp.c')
-rw-r--r--epan/dissectors/packet-tftp.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/epan/dissectors/packet-tftp.c b/epan/dissectors/packet-tftp.c
index b8491eccc2..d5af2a572d 100644
--- a/epan/dissectors/packet-tftp.c
+++ b/epan/dissectors/packet-tftp.c
@@ -138,9 +138,9 @@ tftp_dissect_options(tvbuff_t *tvb, packet_info *pinfo, int offset,
opt_tree = proto_item_add_subtree(opt_item, ett_tftp_option);
proto_tree_add_item(opt_tree, hf_tftp_option_name, tvb, offset,
- option_len, ENC_BIG_ENDIAN);
+ option_len, ENC_ASCII|ENC_NA);
proto_tree_add_item(opt_tree, hf_tftp_option_value, tvb, value_offset,
- value_len, ENC_BIG_ENDIAN);
+ value_len, ENC_ASCII|ENC_NA);
offset += option_len + value_len;
@@ -207,7 +207,7 @@ static void dissect_tftp_message(tftp_conv_info_t *tftp_info,
case TFTP_RRQ:
i1 = tvb_strsize(tvb, offset);
proto_tree_add_item(tftp_tree, hf_tftp_source_file,
- tvb, offset, i1, ENC_BIG_ENDIAN);
+ tvb, offset, i1, ENC_ASCII|ENC_NA);
tftp_info->source_file = tvb_get_seasonal_string(tvb, offset, i1);
@@ -218,7 +218,7 @@ static void dissect_tftp_message(tftp_conv_info_t *tftp_info,
i1 = tvb_strsize(tvb, offset);
proto_tree_add_item(tftp_tree, hf_tftp_transfer_type,
- tvb, offset, i1, ENC_BIG_ENDIAN);
+ tvb, offset, i1, ENC_ASCII|ENC_NA);
col_append_fstr(pinfo->cinfo, COL_INFO, ", Transfer type: %s",
tvb_format_stringzpad(tvb, offset, i1));
@@ -232,7 +232,7 @@ static void dissect_tftp_message(tftp_conv_info_t *tftp_info,
case TFTP_WRQ:
i1 = tvb_strsize(tvb, offset);
proto_tree_add_item(tftp_tree, hf_tftp_destination_file,
- tvb, offset, i1, ENC_BIG_ENDIAN);
+ tvb, offset, i1, ENC_ASCII|ENC_NA);
tftp_info->destination_file =
tvb_get_seasonal_string(tvb, offset, i1);
@@ -244,7 +244,7 @@ static void dissect_tftp_message(tftp_conv_info_t *tftp_info,
i1 = tvb_strsize(tvb, offset);
proto_tree_add_item(tftp_tree, hf_tftp_transfer_type,
- tvb, offset, i1, ENC_BIG_ENDIAN);
+ tvb, offset, i1, ENC_ASCII|ENC_NA);
col_append_fstr(pinfo->cinfo, COL_INFO, ", Transfer type: %s",
tvb_format_stringzpad(tvb, offset, i1));
@@ -300,7 +300,7 @@ static void dissect_tftp_message(tftp_conv_info_t *tftp_info,
i1 = tvb_strsize(tvb, offset);
proto_tree_add_item(tftp_tree, hf_tftp_error_string, tvb, offset,
- i1, ENC_BIG_ENDIAN);
+ i1, ENC_ASCII|ENC_NA);
col_append_fstr(pinfo->cinfo, COL_INFO, ", Message: %s",
tvb_format_stringzpad(tvb, offset, i1));