From 1a7111b6032ce5736d646a033b98d38fc1489742 Mon Sep 17 00:00:00 2001 From: Bill Meier Date: Tue, 23 Sep 2008 00:55:28 +0000 Subject: Minor revision related to proto_reg_handoff ... svn path=/trunk/; revision=26252 --- epan/dissectors/packet-ansi_a.c | 4 ++-- epan/dissectors/packet-ieee8021ah.c | 4 +--- epan/dissectors/packet-sip.c | 2 +- epan/dissectors/packet-tipc.c | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/epan/dissectors/packet-ansi_a.c b/epan/dissectors/packet-ansi_a.c index fccb719d2a..e2b7e82221 100644 --- a/epan/dissectors/packet-ansi_a.c +++ b/epan/dissectors/packet-ansi_a.c @@ -11908,11 +11908,11 @@ proto_register_ansi_a(void) void proto_reg_handoff_ansi_a(void) { - static gboolean ansi_a_prefs_initialized = FALSE; - static dissector_handle_t bsmap_handle; + static gboolean ansi_a_prefs_initialized = FALSE; if (!ansi_a_prefs_initialized) { + dissector_handle_t bsmap_handle; bsmap_handle = create_dissector_handle(dissect_bsmap, proto_a_bsmap); dtap_handle = create_dissector_handle(dissect_dtap, proto_a_dtap); data_handle = find_dissector("data"); diff --git a/epan/dissectors/packet-ieee8021ah.c b/epan/dissectors/packet-ieee8021ah.c index ba1f1a690d..3f4cb612d6 100644 --- a/epan/dissectors/packet-ieee8021ah.c +++ b/epan/dissectors/packet-ieee8021ah.c @@ -432,17 +432,15 @@ proto_reg_handoff_ieee8021ah(void) { static gboolean prefs_initialized = FALSE; static dissector_handle_t ieee8021ah_handle; - static dissector_handle_t ieee8021ad_handle; static unsigned int old_ieee8021ah_ethertype; if (!prefs_initialized){ + dissector_handle_t ieee8021ad_handle; ieee8021ah_handle = create_dissector_handle(dissect_ieee8021ah, proto_ieee8021ah); - ieee8021ad_handle = create_dissector_handle(dissect_ieee8021ad, proto_ieee8021ad); dissector_add("ethertype", ETHERTYPE_IEEE_802_1AD, ieee8021ad_handle); - prefs_initialized = TRUE; } else { diff --git a/epan/dissectors/packet-sip.c b/epan/dissectors/packet-sip.c index 770f97f232..ef7ab7a22a 100644 --- a/epan/dissectors/packet-sip.c +++ b/epan/dissectors/packet-sip.c @@ -3916,13 +3916,13 @@ void proto_register_sip(void) void proto_reg_handoff_sip(void) { - static dissector_handle_t sip_handle; static dissector_handle_t sip_tcp_handle; static guint saved_sip_tcp_port; static guint saved_sip_tls_port; static gboolean sip_prefs_initialized = FALSE; if (!sip_prefs_initialized) { + dissector_handle_t sip_handle; sip_handle = find_dissector("sip"); sip_tcp_handle = find_dissector("sip.tcp"); sigcomp_handle = find_dissector("sigcomp"); diff --git a/epan/dissectors/packet-tipc.c b/epan/dissectors/packet-tipc.c index 1f88c1ea02..d7a16f0027 100644 --- a/epan/dissectors/packet-tipc.c +++ b/epan/dissectors/packet-tipc.c @@ -2966,11 +2966,11 @@ void proto_reg_handoff_tipc(void) { static gboolean inited = FALSE; - static dissector_handle_t tipc_handle; static dissector_handle_t tipc_tcp_handle; static guint tipc_alternate_tcp_port_prev = 0; if (!inited) { + dissector_handle_t tipc_handle; tipc_handle = create_dissector_handle(dissect_tipc, proto_tipc); tipc_tcp_handle = new_create_dissector_handle(dissect_tipc_tcp, proto_tipc); ip_handle = find_dissector("ip"); -- cgit v1.2.3