diff --git a/docs/INTERNALS b/docs/INTERNALS index 54119cf79cd054e7d14ee913a403693ee6963047..9d0bdbaa1b3097752daf10d9d99d14faae27e4d2 100644 --- a/docs/INTERNALS +++ b/docs/INTERNALS @@ -37,7 +37,7 @@ Portability GnuTLS 1.2 zlib 1.1.4 libssh2 0.16 - c-ares 1.5.0 + c-ares 1.6.0 libidn 0.4.1 *yassl 1.4.0 (http://curl.haxx.se/mail/lib-2008-02/0093.html) openldap 2.0 diff --git a/lib/easy.c b/lib/easy.c index bebeeb17f95154c743d313923c2852d3b34a2926..1f839fe2453faa3292bfa7f4c0d9a071d618d28c 100644 --- a/lib/easy.c +++ b/lib/easy.c @@ -700,8 +700,9 @@ CURL *curl_easy_duphandle(CURL *incurl) } #ifdef USE_ARES - /* If we use ares, we setup a new ares channel for the new handle */ - if(ARES_SUCCESS != ares_init(&outcurl->state.areschannel)) + /* If we use ares, we clone the ares channel for the new handle */ + if(ARES_SUCCESS != ares_dup(&outcurl->state.areschannel, + data->state.areschannel)) break; #endif diff --git a/m4/curl-confopts.m4 b/m4/curl-confopts.m4 index 11fdd530154e86c0b7638b38a0371b13b08d6eeb..bb25bb925c5c5db6b6a3d8c373929416bfafb1f6 100644 --- a/m4/curl-confopts.m4 +++ b/m4/curl-confopts.m4 @@ -472,6 +472,7 @@ AC_DEFUN([CURL_CHECK_LIB_ARES], [ ares_channel channel; ares_cancel(channel); /* added in 1.2.0 */ ares_process_fd(channel, 0, 0); /* added in 1.4.0 */ + ares_dup(&channel, channel); /* added in 1.6.0 */ ]]) ],[ AC_MSG_RESULT([yes])