From: Daniel Stenberg Date: Thu, 29 Apr 2004 10:58:22 +0000 (+0000) Subject: curl_easy_duphandle() works again with ares enabled X-Git-Tag: curl-7_12_0~246 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31e9e4bb76462ceb02055317731c7514aac42838;p=thirdparty%2Fcurl.git curl_easy_duphandle() works again with ares enabled --- diff --git a/lib/easy.c b/lib/easy.c index a1289d45b5..c04f01e2af 100644 --- a/lib/easy.c +++ b/lib/easy.c @@ -374,6 +374,14 @@ CURL *curl_easy_duphandle(CURL *incurl) /* start with clearing the entire new struct */ memset(outcurl, 0, sizeof(struct SessionHandle)); +#ifdef USE_ARES + /* If we use ares, we need to setup a new ares channel for the new handle */ + if(ARES_SUCCESS != ares_init(&outcurl->state.areschannel)) { + free(outcurl); + return NULL; + } +#endif + /* * We setup a few buffers we need. We should probably make them * get setup on-demand in the code, as that would probably decrease