Wireshark-bugs: [Wireshark-bugs] [Bug 5263] create ReLOAD dissector (draft-ietf-p2psip-base-10)
Date: Tue, 28 Sep 2010 07:57:23 -0700 (PDT)
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5263

--- Comment #1 from Jaap Keuter <jaap.keuter@xxxxxxxxx> 2010-09-28 16:57:20 CEST ---
Quick review:

+    destination_type_str = match_strval(destination_type, destinationtypes);
+    if (destination_type_str == NULL) destination_type_str = "Unknown";
+    proto_tree_add_uint_format(destination_tree, hf_reload_destination_type,
tvb, offset, 1, destination_type, "destination type: %s",
destination_type_str);
should be
+    proto_tree_add_item(destination_tree, hf_reload_destination_type, tvb,
offset, 1, FALSE);

And

+    { &hf_reload_destination_type,
+      { "Destination type",    "reload.forwarding.destination.type",   
FT_UINT8,
+        BASE_HEX,    NULL,     0x0,     NULL,    HFILL }
+    },
should be
+    { &hf_reload_destination_type,
+      { "Destination type",    "reload.forwarding.destination.type",   
FT_UINT8,
+        BASE_HEX,    VALS(destinationtypes),     0x0,     NULL,    HFILL }
+    },


Same goes for all _add_xxx_format() calls. These can be collapsed into
add_item() calls like this.

-- 
Configure bugmail: https://bugs.wireshark.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.