From 57e18b00346f86f0b5d182fcc749a1a005fadb96 Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Mon, 23 Nov 2015 10:56:36 -0500 Subject: register_dissector -> new_register_dissector Change-Id: Ifc8208e1b96e2a3bf297912500a5f252bfa8eed9 Reviewed-on: https://code.wireshark.org/review/12073 Reviewed-by: Michael Mann --- plugins/mate/packet-mate.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'plugins/mate') diff --git a/plugins/mate/packet-mate.c b/plugins/mate/packet-mate.c index 35f8c333c8..0583984812 100644 --- a/plugins/mate/packet-mate.c +++ b/plugins/mate/packet-mate.c @@ -295,13 +295,14 @@ mate_pdu_tree(mate_pdu *pdu, packet_info *pinfo, tvbuff_t *tvb, proto_tree* tree } } -static void -mate_tree(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +mate_tree(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { mate_pdu* pdus; proto_tree *mate_t; - if ( ! mc || ! tree ) return; + if ( ! mc || ! tree ) + return tvb_captured_length(tvb); mate_analyze_frame(pinfo,tree); @@ -312,6 +313,7 @@ mate_tree(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) mate_pdu_tree(pdus,pinfo,tvb,mate_t); } } + return tvb_captured_length(tvb); } static int @@ -392,14 +394,13 @@ proto_register_mate(void) expert_mate = expert_register_protocol(proto_mate); expert_register_field_array(expert_mate, ei, array_length(ei)); - register_dissector("mate",mate_tree,proto_mate); + mate_handle = new_register_dissector("mate",mate_tree,proto_mate); mate_module = prefs_register_protocol(proto_mate, proto_reg_handoff_mate); prefs_register_filename_preference(mate_module, "config", "Configuration Filename", "The name of the file containing the mate module's configuration", &pref_mate_config_filename); - mate_handle = find_dissector("mate"); register_postdissector(mate_handle); } -- cgit v1.2.1