aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-wifi-p2p.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-wifi-p2p.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-wifi-p2p.c')
-rw-r--r--epan/dissectors/packet-wifi-p2p.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/epan/dissectors/packet-wifi-p2p.c b/epan/dissectors/packet-wifi-p2p.c
index b50145aa50..7ac4ba2e02 100644
--- a/epan/dissectors/packet-wifi-p2p.c
+++ b/epan/dissectors/packet-wifi-p2p.c
@@ -452,7 +452,7 @@ static void dissect_listen_channel(proto_item *tlv_root, proto_item *tlv_item,
tvbuff_t *tvb, int offset)
{
proto_tree_add_item(tlv_root, hf_p2p_attr_listen_channel_country, tvb,
- offset + 3, 3, FALSE);
+ offset + 3, 3, ENC_ASCII|ENC_NA);
proto_tree_add_item(tlv_root, hf_p2p_attr_listen_channel_oper_class, tvb,
offset + 6, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_root, hf_p2p_attr_listen_channel_number, tvb,
@@ -468,7 +468,7 @@ static void dissect_operating_channel(proto_item *tlv_root,
tvbuff_t *tvb, int offset)
{
proto_tree_add_item(tlv_root, hf_p2p_attr_operating_channel_country, tvb,
- offset + 3, 3, FALSE);
+ offset + 3, 3, ENC_ASCII|ENC_NA);
proto_tree_add_item(tlv_root, hf_p2p_attr_operating_channel_oper_class, tvb,
offset + 6, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(tlv_root, hf_p2p_attr_operating_channel_number, tvb,
@@ -486,7 +486,7 @@ static void dissect_channel_list(proto_item *tlv_root, tvbuff_t *tvb,
guint8 num_chan;
proto_tree_add_item(tlv_root, hf_p2p_attr_channel_list_country, tvb,
- s_offset, 3, FALSE);
+ s_offset, 3, ENC_ASCII|ENC_NA);
s_offset += 3;
while (offset + 3 + slen > s_offset) {
@@ -596,7 +596,7 @@ static void dissect_wifi_p2p_device_info(packet_info *pinfo,
item = proto_tree_add_item(tlv_root, hf_p2p_attr_dev_info_dev_name,
tvb, s_offset,
nlen > attr_len ? attr_len : nlen,
- FALSE);
+ ENC_ASCII|ENC_NA);
if (nlen != attr_len) {
expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR,
"Invalid Device Name attribute");
@@ -656,7 +656,7 @@ static void dissect_wifi_p2p_group_id(proto_item *tlv_root,
proto_item_append_text(tlv_item, ": %s", ether_to_str(addr));
s_offset += 6;
proto_tree_add_item(tlv_root, hf_p2p_attr_p2p_group_id_ssid, tvb,
- s_offset, offset + 3 + slen - s_offset, FALSE);
+ s_offset, offset + 3 + slen - s_offset, ENC_ASCII|ENC_NA);
}
static void dissect_wifi_p2p_group_bssid(packet_info *pinfo,
@@ -828,7 +828,7 @@ static void dissect_wifi_p2p_group_info(packet_info *pinfo,
item = proto_tree_add_item(tlv_root, hf_p2p_attr_gi_dev_name,
tvb, s_offset,
nlen > attr_len ? attr_len : nlen,
- FALSE);
+ ENC_ASCII|ENC_NA);
if (nlen != attr_len) {
expert_add_info_format(pinfo, item, PI_MALFORMED, PI_ERROR,
"Invalid Device Name attribute");