diff options
author | Daniel Stenberg <daniel@haxx.se> | 2004-04-29 10:58:22 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2004-04-29 10:58:22 +0000 |
commit | 31e9e4bb76462ceb02055317731c7514aac42838 (patch) | |
tree | 0579ebf7da65865d23dd79a51b9ad6390548561c /lib | |
parent | 84a322ab23f31c00da82a4e902432bd90299e74d (diff) |
curl_easy_duphandle() works again with ares enabled
Diffstat (limited to 'lib')
-rw-r--r-- | lib/easy.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/easy.c b/lib/easy.c index a1289d45b..c04f01e2a 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 |