summaryrefslogtreecommitdiff
path: root/epan/epan.c
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss.ws@gmail.com>2013-08-07 16:46:08 +0000
committerJeff Morriss <jeff.morriss.ws@gmail.com>2013-08-07 16:46:08 +0000
commit2c81a97d55f4aee096933e6dd555efff300c2eec (patch)
treeba7f2fbbbe0e0b3966b9ccb90996dbfb00f688ce /epan/epan.c
parent2dab57f425b34026d772d2ba7df66ab4a21cbdc3 (diff)
downloadwireshark-2c81a97d55f4aee096933e6dd555efff300c2eec.tar.gz
Ensure we have both _initialize() and a corresponding _cleanup() routines for
the various name resolvers; put those two routines next to each other. Add generic addr_resolv_init() and addr_resolv_cleanup() routines which call all of those internal routines. Call the generic init/cleanup routine from epan_init() and epan_cleanup(). Create the hash tables for each name resolver in those initialization routines in order to avoid having to repeatedly check if the table is already created or not (and to avoid glib warnings if we neglected to perform that check): http://www.wireshark.org/lists/wireshark-dev/201308/msg00012.html Don't clean up hostnames in init_dissection(): it's done already in cleanup_dissection(). Don't initialize hostnames in cleanup_dissection(): it's done already in init_dissection(). svn path=/trunk/; revision=51191
Diffstat (limited to 'epan/epan.c')
-rw-r--r--epan/epan.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/epan.c b/epan/epan.c
index 7d311a1027..5c81dfe8d0 100644
--- a/epan/epan.c
+++ b/epan/epan.c
@@ -92,6 +92,9 @@ epan_init(void (*register_all_protocols_func)(register_cb cb, gpointer client_da
/* initialize the GUID to name mapping table */
guids_init();
+ /* initialize name resolution (addr_resolv.c) */
+ addr_resolv_init();
+
except_init();
#ifdef HAVE_LIBGCRYPT
/* initialize libgcrypt (beware, it won't be thread-safe) */
@@ -110,8 +113,6 @@ epan_init(void (*register_all_protocols_func)(register_cb cb, gpointer client_da
packet_init();
dfilter_init();
final_registration_all_protocols();
- /*host_name_lookup_init();*//* We load the hostname file in cf_open, no need to do it here? */
- initialize_ethers();
expert_packet_init();
#ifdef HAVE_LUA
wslua_init(cb, client_data);
@@ -132,8 +133,7 @@ epan_cleanup(void)
gnutls_global_deinit();
#endif
except_deinit();
- host_name_lookup_cleanup();
- eth_name_lookup_cleanup();
+ addr_resolv_cleanup();
wmem_cleanup();
}