]> granicus.if.org Git - curl/commitdiff
curl_easy_duphandle() works again with ares enabled
authorDaniel Stenberg <daniel@haxx.se>
Thu, 29 Apr 2004 10:58:22 +0000 (10:58 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 29 Apr 2004 10:58:22 +0000 (10:58 +0000)
lib/easy.c

index a1289d45b51f86fd4f8757e4f46ac1a675b8336d..c04f01e2afcca4b589b26fc76579cac5d5e749fc 100644 (file)
@@ -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