diff options
author | Michael Mann <mmann78@netscape.net> | 2016-10-05 16:33:54 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2016-10-13 02:51:18 +0000 |
commit | 2eb7b05b8c9c6408268f0d1e81f0a18a02610f1c (patch) | |
tree | bd0a909e3d506ea2e61c446aa8a809b6f728af3b /epan/dissectors/packet-gsm_osmux.c | |
parent | 4d8581d7e15fe4a80a53496b83a853271fc674b6 (diff) |
Convert most UDP dissectors to use "auto" preferences.
Similar to the "tcp.port" changes in I99604f95d426ad345f4b494598d94178b886eb67,
convert dissectors that use "udp.port".
More cleanup done on dissectors that use both TCP and UDP dissector
tables, so that less preference callbacks exist.
Change-Id: If07be9b9e850c244336a7069599cd554ce312dd3
Reviewed-on: https://code.wireshark.org/review/18120
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-gsm_osmux.c')
-rw-r--r-- | epan/dissectors/packet-gsm_osmux.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/epan/dissectors/packet-gsm_osmux.c b/epan/dissectors/packet-gsm_osmux.c index c15734f017..039c3d76fe 100644 --- a/epan/dissectors/packet-gsm_osmux.c +++ b/epan/dissectors/packet-gsm_osmux.c @@ -282,17 +282,14 @@ void proto_register_osmux(void) void proto_reg_handoff_osmux(void) { - static gboolean osmux_initialized = FALSE; - - if (!osmux_initialized) { - osmux_handle = create_dissector_handle(dissect_osmux, proto_osmux); - dissector_add_for_decode_as("udp.port", osmux_handle); - osmux_tap = register_tap("osmux"); - osmux_initialized = TRUE; - stats_tree_register("osmux", "osmux", "Osmux/Packets", 0, - osmux_stats_tree_packet, osmux_stats_tree_init, - NULL); - } + osmux_handle = create_dissector_handle(dissect_osmux, proto_osmux); + dissector_add_for_decode_as_with_preference("udp.port", osmux_handle); + + osmux_tap = register_tap("osmux"); + + stats_tree_register("osmux", "osmux", "Osmux/Packets", 0, + osmux_stats_tree_packet, osmux_stats_tree_init, + NULL); } /* |