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-adwin.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-adwin.c')
-rw-r--r-- | epan/dissectors/packet-adwin.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/epan/dissectors/packet-adwin.c b/epan/dissectors/packet-adwin.c index 236ef32599..033d1ff66e 100644 --- a/epan/dissectors/packet-adwin.c +++ b/epan/dissectors/packet-adwin.c @@ -498,8 +498,6 @@ static int hf_adwin_val4 = -1; static gint ett_adwin = -1; static gint ett_adwin_debug = -1; -static dissector_handle_t data_handle; - /* response/request tracking */ typedef struct _adwin_transaction_t { guint32 req_frame; @@ -854,7 +852,7 @@ dissect_UDPR2(tvbuff_t *tvb, packet_info *pinfo, proto_tree_add_item(adwin_tree, hf_adwin_packet_index, tvb, 4, 4, ENC_LITTLE_ENDIAN); if (! global_adwin_dissect_data) { - call_dissector(data_handle, tvb_new_subset_length(tvb, 8, 250*4), pinfo, adwin_debug_tree); + call_data_dissector(tvb_new_subset_length(tvb, 8, 250*4), pinfo, adwin_debug_tree); return; } @@ -893,7 +891,7 @@ dissect_UDPR3(tvbuff_t *tvb, packet_info *pinfo, proto_tree_add_item(adwin_tree, hf_adwin_packet_no, tvb, 4, 4, ENC_LITTLE_ENDIAN); if (! global_adwin_dissect_data) { - call_dissector(data_handle, tvb_new_subset_length(tvb, 8, 350*4), pinfo, adwin_debug_tree); + call_data_dissector(tvb_new_subset_length(tvb, 8, 350*4), pinfo, adwin_debug_tree); return; } @@ -945,7 +943,7 @@ dissect_UDPR4(tvbuff_t *tvb, packet_info *pinfo, data_type = tvb_get_letohl(tvb, 1412); if (! global_adwin_dissect_data) { - call_dissector(data_handle, tvb_new_subset_length(tvb, 8, 350*4), pinfo, adwin_debug_tree); + call_data_dissector(tvb_new_subset_length(tvb, 8, 350*4), pinfo, adwin_debug_tree); return; } @@ -1004,7 +1002,7 @@ dissect_GDSHP(tvbuff_t *tvb, packet_info *pinfo, proto_tree_add_item(adwin_tree, hf_adwin_unused, tvb, 8, 4, ENC_NA); if (! global_adwin_dissect_data) { - call_dissector(data_handle, tvb_new_subset_length(tvb, 12, 336*4), pinfo, adwin_debug_tree); + call_data_dissector(tvb_new_subset_length(tvb, 12, 336*4), pinfo, adwin_debug_tree); return; } @@ -1170,7 +1168,6 @@ proto_reg_handoff_adwin(void) if (! adwin_prefs_initialized) { adwin_handle = create_dissector_handle(dissect_adwin, proto_adwin); - data_handle = find_dissector("data"); adwin_prefs_initialized = TRUE; } else { dissector_delete_uint("udp.port", udp_port, adwin_handle); |