aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-user_encap.c
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 /epan/dissectors/packet-user_encap.c
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 'epan/dissectors/packet-user_encap.c')
-rw-r--r--epan/dissectors/packet-user_encap.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/epan/dissectors/packet-user_encap.c b/epan/dissectors/packet-user_encap.c
index 46534c356d..034e91a53d 100644
--- a/epan/dissectors/packet-user_encap.c
+++ b/epan/dissectors/packet-user_encap.c
@@ -79,7 +79,6 @@ static expert_field ei_user_encap_not_handled = EI_INIT;
static user_encap_t* encaps = NULL;
static guint num_encaps = 0;
static uat_t* encaps_uat;
-static dissector_handle_t data_handle;
static gint exported_pdu_tap = -1;
@@ -134,7 +133,7 @@ static int dissect_user(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, voi
proto_item_set_text(item,"%s",msg);
expert_add_info_format(pinfo, item, &ei_user_encap_not_handled, "%s", msg);
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
return tvb_captured_length(tvb);
}
if (encap->payload_proto == NULL) {
@@ -146,7 +145,7 @@ static int dissect_user(tvbuff_t* tvb, packet_info* pinfo, proto_tree* tree, voi
proto_item_set_text(item,"%s",msg);
expert_add_info_format(pinfo, item, &ei_user_encap_not_handled, "%s", msg);
- call_dissector(data_handle, tvb, pinfo, tree);
+ call_data_dissector(tvb, pinfo, tree);
return tvb_captured_length(tvb);
}
@@ -225,7 +224,6 @@ void proto_reg_handoff_user_encap(void)
guint i;
user_encap_handle = find_dissector("user_dlt");
- data_handle = find_dissector("data");
user2_encap.encap = WTAP_ENCAP_USER2;
user2_encap.payload_proto_name = g_strdup("pktap");