aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-vuze-dht.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-vuze-dht.c
parent9999016855a210f7b0417592c7543c19abf76d41 (diff)
Keep result of [new_]register_dissector in some dissectors.
svn path=/trunk/; revision=51156
Diffstat (limited to 'epan/dissectors/packet-vuze-dht.c')
-rw-r--r--epan/dissectors/packet-vuze-dht.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/epan/dissectors/packet-vuze-dht.c b/epan/dissectors/packet-vuze-dht.c
index 631c327b17..594ea1fddb 100644
--- a/epan/dissectors/packet-vuze-dht.c
+++ b/epan/dissectors/packet-vuze-dht.c
@@ -268,6 +268,8 @@ static gint ett_vuze_dht_value = -1;
static gint ett_vuze_dht_network_coordinates = -1;
static gint ett_vuze_dht_network_coordinate = -1;
+static dissector_handle_t vuze_dht_handle;
+
/* port use */
static guint global_vuze_dht_udp_port = DEFAULT_UDP_PORT;
@@ -1424,7 +1426,8 @@ proto_register_vuze_dht(void)
proto_register_field_array(proto_vuze_dht, hf, array_length(hf));
proto_register_subtree_array(ett, array_length(ett));
- new_register_dissector("vuze-dht", dissect_vuze_dht, proto_vuze_dht);
+
+ vuze_dht_handle = new_register_dissector("vuze-dht", dissect_vuze_dht, proto_vuze_dht);
/* Register our configuration options */
vuze_dht_module = prefs_register_protocol(proto_vuze_dht, proto_reg_handoff_vuze_dht);
@@ -1439,12 +1442,10 @@ void
proto_reg_handoff_vuze_dht(void)
{
static gboolean vuze_dht_prefs_initialized = FALSE;
- static dissector_handle_t vuze_dht_handle;
static guint vuze_dht_udp_port;
if (!vuze_dht_prefs_initialized)
{
- vuze_dht_handle = new_create_dissector_handle(dissect_vuze_dht, proto_vuze_dht);
vuze_dht_prefs_initialized = TRUE;
}
else