From 8faf5c80b3302247c32e1f5c492cb31a082ee0ad Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Fri, 13 Nov 2015 20:18:34 -0500 Subject: register_dissector -> new_register_dissector Picking off "easy" dissectors that only have one or two exit points at most. Change-Id: I25fe6a0aac93980333217d007702799d16946563 Reviewed-on: https://code.wireshark.org/review/11816 Petri-Dish: Michael Mann Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann --- epan/dissectors/packet-m3ua.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'epan/dissectors/packet-m3ua.c') diff --git a/epan/dissectors/packet-m3ua.c b/epan/dissectors/packet-m3ua.c index 2c92ce0bd2..81b36bb546 100644 --- a/epan/dissectors/packet-m3ua.c +++ b/epan/dissectors/packet-m3ua.c @@ -1999,8 +1999,8 @@ dissect_message(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *tree, pro dissect_parameters(parameters_tvb, pinfo, tree, m3ua_tree); } -static void -dissect_m3ua(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_m3ua(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { proto_item *m3ua_item; proto_tree *m3ua_tree; @@ -2028,6 +2028,7 @@ dissect_m3ua(tvbuff_t *message_tvb, packet_info *pinfo, proto_tree *tree) /* dissect the message */ dissect_message(message_tvb, pinfo, tree, m3ua_tree); + return tvb_captured_length(message_tvb); } /* Register the protocol with Wireshark */ @@ -2131,7 +2132,7 @@ proto_register_m3ua(void) /* Register the protocol name and description */ proto_m3ua = proto_register_protocol("MTP 3 User Adaptation Layer", "M3UA", "m3ua"); - register_dissector("m3ua", dissect_m3ua, proto_m3ua); + new_register_dissector("m3ua", dissect_m3ua, proto_m3ua); m3ua_module = prefs_register_protocol(proto_m3ua, NULL); prefs_register_enum_preference(m3ua_module, "version", "M3UA Version", "Version used by Wireshark", &version, options, FALSE); -- cgit v1.2.3