diff options
author | Yang Tse <yangsita@gmail.com> | 2006-07-10 16:14:36 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2006-07-10 16:14:36 +0000 |
commit | 34f5e8ad0ed29d4dd7c59768339e37c9be2e533a (patch) | |
tree | 572fe14b40ee935ebe23f321b6199a5a6f261f60 | |
parent | c2fee9894a60bc21d37220723e7df4d7a58010b8 (diff) |
DNS cache must use the multi DNS cache if the easy handle's one is not using anyone in curl_multi_add_handle.
-rw-r--r-- | lib/multi.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/multi.c b/lib/multi.c index 5f98c2eaf..c59145414 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -322,6 +322,12 @@ CURLMcode curl_multi_add_handle(CURLM *multi_handle, if (easy->easy_handle->dns.hostcache && (easy->easy_handle->dns.hostcachetype == HCACHE_PRIVATE)) { Curl_hash_destroy(easy->easy_handle->dns.hostcache); + easy->easy_handle->dns.hostcache = NULL; + easy->easy_handle->dns.hostcachetype = HCACHE_NONE; + } + + if (!easy->easy_handle->dns.hostcache || + (easy->easy_handle->dns.hostcachetype == HCACHE_NONE)) { easy->easy_handle->dns.hostcache = multi->hostcache; easy->easy_handle->dns.hostcachetype = HCACHE_MULTI; } |