From f4bcbeb9f26874ab763e78056638541a5b371cde Mon Sep 17 00:00:00 2001 From: Jakub Zawadzki Date: Mon, 5 Aug 2013 19:09:44 +0000 Subject: Keep result of [new_]register_dissector in some dissectors. [2 of x] (don't create new dissector handle if we can use already existing one) svn path=/trunk/; revision=51159 --- epan/dissectors/packet-asterix.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'epan/dissectors/packet-asterix.c') diff --git a/epan/dissectors/packet-asterix.c b/epan/dissectors/packet-asterix.c index 52fcbc5d1d..20b6236ae5 100644 --- a/epan/dissectors/packet-asterix.c +++ b/epan/dissectors/packet-asterix.c @@ -1466,9 +1466,9 @@ static gint ett_065_050 = -1; static gint ett_065_RE = -1; static gint ett_065_SP = -1; +static dissector_handle_t asterix_handle; static dissector_handle_t data_handle = NULL; -static dissector_handle_t asterix_handle; #define FIXED 0x01 #define REPETITIVE 0x02 @@ -6152,13 +6152,13 @@ void proto_register_asterix (void) proto_register_field_array (proto_asterix, hf, array_length (hf)); proto_register_subtree_array (ett, array_length (ett)); - register_dissector ("asterix", dissect_asterix, proto_asterix); + + asterix_handle = register_dissector ("asterix", dissect_asterix, proto_asterix); } void proto_reg_handoff_asterix (void) { data_handle = find_dissector ("data"); - asterix_handle = create_dissector_handle (dissect_asterix, proto_asterix); dissector_add_uint ("udp.port", ASTERIX_PORT, asterix_handle); } -- cgit v1.2.1