aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-zep.c
diff options
context:
space:
mode:
authorJakub Zawadzki <darkjames-ws@darkjames.pl>2013-08-05 18:09:43 +0000
committerJakub Zawadzki <darkjames-ws@darkjames.pl>2013-08-05 18:09:43 +0000
commit5fa2a99087bc56ea57ff31a7abf1d17f6bf8a2ca (patch)
treed7066597386b650b9f4b82cf5ea9c8e22c36a980 /epan/dissectors/packet-zep.c
parent9999016855a210f7b0417592c7543c19abf76d41 (diff)
Keep result of [new_]register_dissector in some dissectors.
svn path=/trunk/; revision=51156
Diffstat (limited to 'epan/dissectors/packet-zep.c')
-rw-r--r--epan/dissectors/packet-zep.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/epan/dissectors/packet-zep.c b/epan/dissectors/packet-zep.c
index a135755ea6..770af77754 100644
--- a/epan/dissectors/packet-zep.c
+++ b/epan/dissectors/packet-zep.c
@@ -81,7 +81,10 @@ static gint ett_zep = -1;
/* Initialize preferences. */
static guint32 gPREF_zep_udp_port = ZEP_DEFAULT_PORT;
-/* Dissector handles */
+/* Dissector handle */
+static dissector_handle_t zep_handle;
+
+/* Subdissector handles */
static dissector_handle_t data_handle;
static dissector_handle_t ieee802154_handle;
static dissector_handle_t ieee802154_ccfcs_handle;
@@ -320,7 +323,7 @@ void proto_register_zep(void)
10, &gPREF_zep_udp_port);
/* Register dissector with Wireshark. */
- register_dissector("zep", dissect_zep, proto_zep);
+ zep_handle = register_dissector("zep", dissect_zep, proto_zep);
} /* proto_register_zep */
/*FUNCTION:------------------------------------------------------
@@ -337,7 +340,6 @@ void proto_register_zep(void)
*/
void proto_reg_handoff_zep(void)
{
- static dissector_handle_t zep_handle;
static int lastPort;
static gboolean inited = FALSE;
@@ -352,7 +354,6 @@ void proto_reg_handoff_zep(void)
h = find_dissector("ieee802154_ccfcs"); /* otherwise use older 802.15.4 (Chipcon) plugin disector */
}
ieee802154_ccfcs_handle = h;
- zep_handle = find_dissector("zep");
data_handle = find_dissector("data");
inited = TRUE;
} else {