1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-11 03:55:03 -05:00

DNS cache must use the multi DNS cache if the easy handle's one is not using anyone in curl_multi_add_handle.

This commit is contained in:
Yang Tse 2006-07-10 16:14:36 +00:00
parent c2fee9894a
commit 34f5e8ad0e

View File

@ -322,6 +322,12 @@ CURLMcode curl_multi_add_handle(CURLM *multi_handle,
if (easy->easy_handle->dns.hostcache && if (easy->easy_handle->dns.hostcache &&
(easy->easy_handle->dns.hostcachetype == HCACHE_PRIVATE)) { (easy->easy_handle->dns.hostcachetype == HCACHE_PRIVATE)) {
Curl_hash_destroy(easy->easy_handle->dns.hostcache); 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.hostcache = multi->hostcache;
easy->easy_handle->dns.hostcachetype = HCACHE_MULTI; easy->easy_handle->dns.hostcachetype = HCACHE_MULTI;
} }