From 02a83915359f7fadf149df0fe0dea8e971bb32f4 Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Sat, 2 Nov 2013 15:52:25 +0000 Subject: Require dissector_try_string to pass a data parameter to its subdissectors. There weren't that many calls, so might as well modify the function than create a need for dissector_try_string_new. svn path=/trunk/; revision=53049 --- epan/dissectors/packet-dcp-etsi.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'epan/dissectors/packet-dcp-etsi.c') diff --git a/epan/dissectors/packet-dcp-etsi.c b/epan/dissectors/packet-dcp-etsi.c index dc8e4b176e..0d0283ece6 100644 --- a/epan/dissectors/packet-dcp-etsi.c +++ b/epan/dissectors/packet-dcp-etsi.c @@ -199,7 +199,7 @@ dissect_dcp_etsi (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void * } sync = tvb_get_string (wmem_packet_scope(), tvb, 0, 2); - dissector_try_string(dcp_dissector_table, (char*)sync, tvb, pinfo, dcp_tree); + dissector_try_string(dcp_dissector_table, (char*)sync, tvb, pinfo, dcp_tree, NULL); return TRUE; } @@ -623,19 +623,18 @@ dissect_af (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) static void dissect_tpl(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree) { - proto_tree *tpl_tree = NULL; + proto_tree *tpl_tree; guint offset=0; char *prot=NULL; + proto_item *ti; guint16 maj, min; pinfo->current_proto = "DCP-TPL"; col_set_str(pinfo->cinfo, COL_PROTOCOL, "DCP-TPL"); - if(tree) { - proto_item *ti = NULL; - ti = proto_tree_add_item (tree, proto_tpl, tvb, 0, -1, ENC_NA); - tpl_tree = proto_item_add_subtree (ti, ett_tpl); - } + ti = proto_tree_add_item (tree, proto_tpl, tvb, 0, -1, ENC_NA); + tpl_tree = proto_item_add_subtree (ti, ett_tpl); + while(offsetparent); - } + + dissector_try_string(tpl_dissector_table, prot, tvb, pinfo, tree->parent, NULL); } void -- cgit v1.2.3