aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-gadu-gadu.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2014-08-07 08:36:30 -0400
committerAnders Broman <a.broman58@gmail.com>2014-08-08 05:51:52 +0000
commita22b7075f84b8faf83a3ef05e45ea6d922c5001f (patch)
tree519e874bc10d1231b0dd9632dd91dabbb11502ef /epan/dissectors/packet-gadu-gadu.c
parent532a98dc8c827471e143c81517b7ebb321400f84 (diff)
Eliminate proto_tree_add_text from some dissectors.
Change-Id: I6f1710a093fc548c718defa9b40ab68877ede977 Reviewed-on: https://code.wireshark.org/review/3470 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-gadu-gadu.c')
-rw-r--r--epan/dissectors/packet-gadu-gadu.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/epan/dissectors/packet-gadu-gadu.c b/epan/dissectors/packet-gadu-gadu.c
index 2e52e67e6c..649473cf22 100644
--- a/epan/dissectors/packet-gadu-gadu.c
+++ b/epan/dissectors/packet-gadu-gadu.c
@@ -497,6 +497,10 @@ static header_field_info hfi_gadu_gadu_userlist_format GADU_GADU_HFI_INIT =
static header_field_info hfi_gadu_gadu_userlist_reply_type GADU_GADU_HFI_INIT =
{ "Reply type", "gadu-gadu.userlist.reply_type", FT_UINT32, BASE_HEX, gadu_gadu_userlist_reply_type_vals, 0x00, NULL, HFILL };
+static header_field_info hfi_gadu_gadu_userlist GADU_GADU_HFI_INIT =
+ { "Userlist XML data", "gadu-gadu.userlist", FT_BYTES, BASE_NONE, NULL, 0x00, NULL, HFILL };
+
+
/* Public Directory (gadu-gadu.pubdir.*) */
static header_field_info hfi_gadu_gadu_pubdir_request_type GADU_GADU_HFI_INIT =
{ "Request type", "gadu-gadu.pubdir.request_type", FT_UINT8, BASE_HEX, gadu_gadu_pubdir_type_vals, 0x00, NULL, HFILL };
@@ -1440,14 +1444,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_text(tree, tvb, offset, remain, "Userlist XML data: [Decompression succeeded]");
+ proto_tree_add_bytes_format_value(tree, hfi_gadu_gadu_userlist.id, tvb, offset, remain, NULL, "[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_text(tree, tvb, offset, remain, "Userlist XML data: [Error: Decompression failed] (or no libz)");
+ proto_tree_add_bytes_format_value(tree, hfi_gadu_gadu_userlist.id, tvb, offset, remain, NULL, "[Error: Decompression failed] (or no libz)");
offset += remain;