aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-enip.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2014-08-01 10:08:57 -0400
committerMichael Mann <mmann78@netscape.net>2014-08-03 16:30:10 +0000
commit5db1352526e71727091ff0e1c0e97821eec4e4cb (patch)
tree01f836967616b7ae8b2840c488b500c7ff13d55c /epan/dissectors/packet-enip.c
parent3fa5625ea074908d5617111a7edfcf6d95e6108a (diff)
Eliminate proto_tree_add_text from some dissectors.
Change-Id: I398e9cf4f6882e76644aa758e12c39a39159e95f Reviewed-on: https://code.wireshark.org/review/3319 Petri-Dish: Michael Mann <mmann78@netscape.net> Petri-Dish: Evan Huus <eapache@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-enip.c')
-rw-r--r--epan/dissectors/packet-enip.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/epan/dissectors/packet-enip.c b/epan/dissectors/packet-enip.c
index 2edfdf860a..1d7a1e2c1b 100644
--- a/epan/dissectors/packet-enip.c
+++ b/epan/dissectors/packet-enip.c
@@ -284,6 +284,7 @@ static int hf_dlr_active_gateway_precedence = -1;
/* Initialize the subtree pointers */
static gint ett_enip = -1;
+static gint ett_path = -1;
static gint ett_count_tree = -1;
static gint ett_type_tree = -1;
static gint ett_command_tree = -1;
@@ -1343,6 +1344,7 @@ dissect_tcpip_physical_link(packet_info *pinfo, proto_tree *tree, proto_item *it
{
guint16 path_size;
+ proto_tree *epath_tree;
proto_item *path_item;
path_size = tvb_get_letohs( tvb, offset)*2;
@@ -1354,8 +1356,8 @@ dissect_tcpip_physical_link(packet_info *pinfo, proto_tree *tree, proto_item *it
return total_len;
}
- path_item = proto_tree_add_text(tree, tvb, offset+2, path_size, "Path: ");
- dissect_epath( tvb, pinfo, path_item, offset+2, path_size, FALSE, FALSE, NULL, NULL);
+ epath_tree = proto_tree_add_subtree(tree, tvb, offset+2, path_size, ett_path, &path_item, "Path: ");
+ dissect_epath( tvb, pinfo, epath_tree, path_item, offset+2, path_size, FALSE, FALSE, NULL, NULL);
return path_size+2;
}
@@ -3431,6 +3433,7 @@ proto_register_enip(void)
/* Setup protocol subtree array */
static gint *ett[] = {
&ett_enip,
+ &ett_path,
&ett_count_tree,
&ett_type_tree,
&ett_command_tree,