From 34f5e8ad0ed29d4dd7c59768339e37c9be2e533a Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Mon, 10 Jul 2006 16:14:36 +0000 Subject: DNS cache must use the multi DNS cache if the easy handle's one is not using anyone in curl_multi_add_handle. --- lib/multi.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib') 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; } -- cgit v1.2.3