aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2013-08-20 13:21:07 +0200
committerDaniel Stenberg <daniel@haxx.se>2013-08-20 23:13:19 +0200
commitbc7d806e3abb512156bec34685711600bf459254 (patch)
treecd38880f2d8b48d8774307b41b9c15ff09f33c2c /lib
parent6cf8413e31629183b3c749aa2a17d24be14cbca1 (diff)
multi: remove dns cache creation code from *add_handle
As it is done unconditionally in multi_init() this code will never run!
Diffstat (limited to 'lib')
-rw-r--r--lib/multi.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/lib/multi.c b/lib/multi.c
index 306b76955..32bd8bfd1 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -345,7 +345,6 @@ CURLMcode curl_multi_add_handle(CURLM *multi_handle,
struct Curl_multi *multi = (struct Curl_multi *)multi_handle;
struct SessionHandle *data = (struct SessionHandle *)easy_handle;
struct SessionHandle *new_closure = NULL;
- struct curl_hash *hostcache = NULL;
/* First, make some basic checks that the CURLM handle is a good handle */
if(!GOOD_MULTI_HANDLE(multi))
@@ -366,22 +365,11 @@ CURLMcode curl_multi_add_handle(CURLM *multi_handle,
if(!timeoutlist)
return CURLM_OUT_OF_MEMORY;
- /* In case multi handle has no hostcache yet, allocate one */
- if(!multi->hostcache) {
- hostcache = Curl_mk_dnscache();
- if(!hostcache) {
- free(data);
- Curl_llist_destroy(timeoutlist, NULL);
- return CURLM_OUT_OF_MEMORY;
- }
- }
-
/* In case multi handle has no closure_handle yet, allocate
a new easy handle to use when closing cached connections */
if(!multi->closure_handle) {
new_closure = (struct SessionHandle *)curl_easy_init();
if(!new_closure) {
- Curl_hash_destroy(hostcache);
free(data);
Curl_llist_destroy(timeoutlist, NULL);
return CURLM_OUT_OF_MEMORY;
@@ -403,11 +391,6 @@ CURLMcode curl_multi_add_handle(CURLM *multi_handle,
multi->closure_handle->state.conn_cache = multi->conn_cache;
}
- /* In case hostcache has been allocated above,
- it is associated now with the multi handle. */
- if(hostcache)
- multi->hostcache = hostcache;
-
/* Make easy handle use timeout list initialized above */
data->state.timeoutlist = timeoutlist;
timeoutlist = NULL;