diff options
author | Michael Mann <mmann78@netscape.net> | 2016-03-19 20:33:14 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2016-03-20 17:38:03 +0000 |
commit | 1e60d63c8c6882c8c0bdb00cf6df594e1bb6fccf (patch) | |
tree | 4147c4f2bee3b93c250a49fa8ec337072c80e713 /epan/dissectors/packet-tipc.c | |
parent | 2b2fc64447e5f778d969e6c850e9196d248cbbe1 (diff) |
Create call_data_dissector() to call data dissector.
This saves many dissectors the need to find the data dissector and store a handle to it.
There were also some that were finding it, but not using it.
For others this was the only reason for their handoff function, so it could be eliminated.
Change-Id: I5d3f951ee1daa3d30c060d21bd12bbc881a8027b
Reviewed-on: https://code.wireshark.org/review/14530
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-tipc.c')
-rw-r--r-- | epan/dissectors/packet-tipc.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/epan/dissectors/packet-tipc.c b/epan/dissectors/packet-tipc.c index cfe55bde1b..16076f53da 100644 --- a/epan/dissectors/packet-tipc.c +++ b/epan/dissectors/packet-tipc.c @@ -44,7 +44,6 @@ void proto_register_tipc(void); static int proto_tipc = -1; /* dissector handles */ -static dissector_handle_t data_handle; static dissector_handle_t ip_handle; static int hf_tipc_msg_fragments = -1; @@ -1479,14 +1478,14 @@ dissect_tipc_v2_internal_msg(tvbuff_t *tipc_tvb, proto_tree *tipc_tree, packet_i dissect_tipc(new_tvb, pinfo, top_tree, NULL); } else { /* make a new subset */ data_tvb = tvb_new_subset(tipc_tvb, offset, len, reported_len); - call_dissector(data_handle, data_tvb, pinfo, top_tree); + call_data_dissector(data_tvb, pinfo, top_tree); } pinfo->fragmented = save_fragmented; } else { /* don't reassemble is set in the "preferences" */ data_tvb = tvb_new_subset(tipc_tvb, offset, len, reported_len); - call_dissector(data_handle, data_tvb, pinfo, top_tree); + call_data_dissector(data_tvb, pinfo, top_tree); } break; @@ -1669,7 +1668,7 @@ call_tipc_v2_data_subdissectors(tvbuff_t *data_tvb, packet_info *pinfo, guint32 /* dissection of TIPC data is not set in preferences or no subdissector found */ - call_dissector(data_handle, data_tvb, pinfo, top_tree); + call_data_dissector(data_tvb, pinfo, top_tree); } @@ -3102,7 +3101,6 @@ proto_reg_handoff_tipc(void) if (!inited) { tipc_tcp_handle = create_dissector_handle(dissect_tipc_tcp, proto_tipc); ip_handle = find_dissector("ip"); - data_handle = find_dissector("data"); dissector_add_uint("ethertype", ETHERTYPE_TIPC, tipc_handle); |