mirror of
https://github.com/curl/curl.git
synced 2026-08-25 22:13:33 +03:00
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.
This commit is contained in:
parent
d37e0160c2
commit
b419e7ae0c
10 changed files with 31 additions and 82 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue