From b30247cccb02b6ea670f62f6ee6b92143e00d972 Mon Sep 17 00:00:00 2001 From: Jaap Keuter Date: Fri, 30 Oct 2009 21:57:43 +0000 Subject: Prepare for c-ares 1.6.1 release. svn path=/trunk/; revision=30773 --- epan/addr_resolv.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'epan/addr_resolv.c') diff --git a/epan/addr_resolv.c b/epan/addr_resolv.c index d2fb8235f8..5fd9a416a0 100644 --- a/epan/addr_resolv.c +++ b/epan/addr_resolv.c @@ -2279,9 +2279,15 @@ host_name_lookup_init(void) { g_free(hostspath); #ifdef HAVE_C_ARES +#ifdef CARES_HAVE_ARES_LIBRARY_INIT + if (ares_library_init(ARES_LIB_INIT_ALL) == ARES_SUCCESS) { +#endif if (ares_init(&alchan) == ARES_SUCCESS) { async_dns_initialized = TRUE; } +#ifdef CARES_HAVE_ARES_LIBRARY_INIT + } +#endif #else #ifdef HAVE_GNU_ADNS /* @@ -2386,8 +2392,12 @@ host_name_lookup_cleanup(void) { g_list_free(async_dns_queue_head); - if (async_dns_initialized) + if (async_dns_initialized) { ares_destroy(alchan); + } +#ifdef CARES_HAVE_ARES_LIBRARY_INIT + ares_library_cleanup(); +#endif async_dns_initialized = FALSE; } -- cgit v1.2.3