diff options
author | Daniel Stenberg <daniel@haxx.se> | 2008-01-15 22:44:12 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2008-01-15 22:44:12 +0000 |
commit | 991505e077f4ecdbd0b1d0f42be0c9b548dc743d (patch) | |
tree | 34b3e98e43004e2a577ffe4f421acdabbcf6170f /lib/hostip.h | |
parent | 56f17d2c9f3d229d701bcf0dda83f4d29c0e02ba (diff) | |
download | curl-991505e077f4ecdbd0b1d0f42be0c9b548dc743d.tar.gz |
Woops, partly revert my previous commit and do it slightly differently instead.
The signalling of that a global DNS cache is wanted is done by setting the
option but the setting of the internal variable that it is in use must not be
done until it finally actually gets used!
NOTE and WARNING: I noticed that you can't actually switch off the global dns
cache with CURLOPT_DNS_USE_GLOBAL_CACHE but you couldn't do that previously
either and the option is very clearly and loudly documented as DO NOTE USE so
I won't bother to fix this bug now.
Diffstat (limited to 'lib/hostip.h')
-rw-r--r-- | lib/hostip.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/hostip.h b/lib/hostip.h index a7e0988a2..66d1771a3 100644 --- a/lib/hostip.h +++ b/lib/hostip.h @@ -130,14 +130,10 @@ struct connectdata; * Global DNS cache is general badness. Do not use. This will be removed in * a future version. Use the share interface instead! * - * Returns 0 on success, 1 on failure. + * Returns a struct curl_hash pointer on success, NULL on failure. */ -int Curl_global_host_cache_init(void); +struct curl_hash *Curl_global_host_cache_init(void); void Curl_global_host_cache_dtor(void); -struct curl_hash *Curl_global_host_cache_get(void); - -#define Curl_global_host_cache_use(__p) \ - ((__p)->dns.hostcachetype == HCACHE_GLOBAL) struct Curl_dns_entry { Curl_addrinfo *addr; |