aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
diff options
context:
space:
mode:
authorJaap Keuter <jaap.keuter@xs4all.nl>2020-01-11 00:03:39 +0100
committerJaap Keuter <jaap.keuter@xs4all.nl>2020-01-11 08:02:30 +0000
commitf9c2bdc413e01e70ac66494f012feb87c9ae8f6b (patch)
tree64a00488951e242aa8ca459543bc3ee52d9bea1a /epan/dissectors
parentf1a49e55b1fd951a5dac7d70bc0828607420cda9 (diff)
Implement all mapping macros for the new proto tree API
The new proto tree API uses mapping macros to map calls to the proto_tree_add_* functions. These were defined for the up til then in use functions. In the mean time functions have been added and workarounds for non mapped functions were used. This change adds the missing mapping macros so that now all proto_tree_add_* functions taking a hfi address are mapped properly. Also fix two dissectors that failed the mapping. Change-Id: I91d800439fe2c4487ca53c00c44d7aa46ce70e1d Reviewed-on: https://code.wireshark.org/review/35743 Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Jörg Mayer <jmayer@loplof.de> Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/packet-gadu-gadu.c4
-rw-r--r--epan/dissectors/packet-netlink-net_dm.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/epan/dissectors/packet-gadu-gadu.c b/epan/dissectors/packet-gadu-gadu.c
index 2f6cb78b0d..e462d53be3 100644
--- a/epan/dissectors/packet-gadu-gadu.c
+++ b/epan/dissectors/packet-gadu-gadu.c
@@ -1428,14 +1428,14 @@ dissect_gadu_gadu_userlist_xml_compressed(tvbuff_t *tvb, packet_info *pinfo, pro
return offset;
if ((uncomp_tvb = tvb_child_uncompress(tvb, tvb, offset, remain))) {
- proto_tree_add_bytes_format_value(tree, &hfi_gadu_gadu_userlist, tvb, offset, remain, NULL, "[Decompression succeeded]");
+ proto_tree_add_bytes_format_value(tree, &hfi_gadu_gadu_userlist, tvb, offset, remain, NULL, "%s", "[Decompression succeeded]");
add_new_data_source(pinfo, uncomp_tvb, "Uncompressed userlist");
/* XXX add DTD (pinfo->match_string) */
call_dissector_only(xml_handle, uncomp_tvb, pinfo, tree, NULL);
} else
- proto_tree_add_bytes_format_value(tree, &hfi_gadu_gadu_userlist, tvb, offset, remain, NULL, "[Error: Decompression failed] (or no zlib)");
+ proto_tree_add_bytes_format_value(tree, &hfi_gadu_gadu_userlist, tvb, offset, remain, NULL, "%s", "[Error: Decompression failed] (or no zlib)");
offset += remain;
diff --git a/epan/dissectors/packet-netlink-net_dm.c b/epan/dissectors/packet-netlink-net_dm.c
index 3b463b3350..6d9392e5b2 100644
--- a/epan/dissectors/packet-netlink-net_dm.c
+++ b/epan/dissectors/packet-netlink-net_dm.c
@@ -312,7 +312,7 @@ dissect_net_dm_attrs(tvbuff_t *tvb, void *data, struct packet_netlink_data *nl_d
proto_tree_add_item(tree, &hfi_net_dm_alert_mode, tvb, offset, len, nl_data->encoding);
return 1;
case WS_NET_DM_ATTR_PC:
- proto_tree_add_item_ret_uint64(tree, hfi_net_dm_pc.id, tvb,
+ proto_tree_add_item_ret_uint64(tree, &hfi_net_dm_pc, tvb,
offset, 8, nl_data->encoding, &pc);
proto_item_append_text(tree, ": 0x%" G_GINT64_MODIFIER "x", pc);
return 1;