aboutsummaryrefslogtreecommitdiff
path: root/lib/hostip.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-02-18 07:56:18 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-02-18 07:56:18 +0000
commite2b6a45cfa5a3c8dd9d7747809b562e5b66e7f14 (patch)
tree33d49d9226d87939c40f07e08234603291d5378a /lib/hostip.c
parente0c0b2ba7da94b3972d734a733156e92b856d794 (diff)
Make sure dns cache timeout -1 really means forever, as it is documented to
be. Simply skip the pruning.
Diffstat (limited to 'lib/hostip.c')
-rw-r--r--lib/hostip.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/hostip.c b/lib/hostip.c
index 2e9d530dd..05e6e8c34 100644
--- a/lib/hostip.c
+++ b/lib/hostip.c
@@ -200,6 +200,11 @@ hostcache_prune(curl_hash *hostcache, int cache_timeout, int now)
void Curl_hostcache_prune(struct SessionHandle *data)
{
time_t now;
+
+ if(data->set.dns_cache_timeout == -1)
+ /* cache forever means never prune! */
+ return;
+
if(data->share)
Curl_share_lock(data, CURL_LOCK_DATA_DNS, CURL_LOCK_ACCESS_SINGLE);