aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/profinet
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2016-03-19 20:33:14 -0400
committerMichael Mann <mmann78@netscape.net>2016-03-20 17:38:03 +0000
commit1e60d63c8c6882c8c0bdb00cf6df594e1bb6fccf (patch)
tree4147c4f2bee3b93c250a49fa8ec337072c80e713 /plugins/profinet
parent2b2fc64447e5f778d969e6c850e9196d248cbbe1 (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 'plugins/profinet')
-rw-r--r--plugins/profinet/packet-pn-rt.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/plugins/profinet/packet-pn-rt.c b/plugins/profinet/packet-pn-rt.c
index ac0acb9e10..8757a1a9ff 100644
--- a/plugins/profinet/packet-pn-rt.c
+++ b/plugins/profinet/packet-pn-rt.c
@@ -330,7 +330,6 @@ dissect_CSF_SDU_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *
static reassembly_table pdu_reassembly_table;
static GHashTable *reasembled_frag_table = NULL;
-static dissector_handle_t data_handle;
static dissector_table_t ethertype_subdissector_table;
static guint32 start_frag_OR_ID[16];
@@ -447,7 +446,7 @@ dissect_FRAG_PDU_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
type = tvb_get_ntohs(pdu_tvb, 0);
pdu_tvb = tvb_new_subset_remaining(pdu_tvb, 2);
if (!dissector_try_uint(ethertype_subdissector_table, type, pdu_tvb, pinfo, tree))
- call_dissector(data_handle, pdu_tvb, pinfo, tree);
+ call_data_dissector(pdu_tvb, pinfo, tree);
}
}
return TRUE;
@@ -1001,7 +1000,6 @@ proto_reg_handoff_pn_rt(void)
heur_dissector_add("pn_rt", dissect_CSF_SDU_heur, "PROFINET CSF_SDU IO", "pn_csf_sdu_pn_rt", proto_pn_rt, HEURISTIC_ENABLE);
heur_dissector_add("pn_rt", dissect_FRAG_PDU_heur, "PROFINET Frag PDU IO", "pn_frag_pn_rt", proto_pn_rt, HEURISTIC_ENABLE);
- data_handle = find_dissector("data");
ethertype_subdissector_table = find_dissector_table("ethertype");
}