From b419e7ae0c9869ac3eb06d529efeb2c6dc1b4bc1 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 12 May 2015 09:46:53 +0200 Subject: hostcache: made all host caches use structs, not pointers This avoids unnecessary dynamic allocs and as this also removed the last users of *hash_alloc() and *hash_destroy(), those two functions are now removed. --- lib/url.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/url.c') diff --git a/lib/url.c b/lib/url.c index c99066074..20b802ad1 100644 --- a/lib/url.c +++ b/lib/url.c @@ -2187,9 +2187,9 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option, data->share->dirty++; - if(data->share->hostcache) { + if(data->share->specifier & (1<< CURL_LOCK_DATA_DNS)) { /* use shared host cache */ - data->dns.hostcache = data->share->hostcache; + data->dns.hostcache = &data->share->hostcache; data->dns.hostcachetype = HCACHE_SHARED; } #if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES) -- cgit v1.2.3