From 0db831976e4b2d2553c8cd9aaae492970d830f57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20B=C3=BChler?= Date: Tue, 17 Mar 2015 09:09:43 +0100 Subject: fix refreshing of obsolete dns cache entries - cache entries must be also refreshed when they are in use - have the cache count as inuse reference too, freeing timestamp == 0 special value - use timestamp == 0 for CURLOPT_RESOLVE entries which don't get refreshed - remove CURLOPT_RESOLVE special inuse reference (timestamp == 0 will prevent refresh) - fix Curl_hostcache_clean - CURLOPT_RESOLVE entries don't have a special reference anymore, and it would also release non CURLOPT_RESOLVE references - fix locking in Curl_hostcache_clean - fix unit1305.c: hash now keeps a reference, need to set inuse = 1 --- tests/unit/unit1305.c | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/unit/unit1305.c') diff --git a/tests/unit/unit1305.c b/tests/unit/unit1305.c index 93815e5f8..4f9c609b0 100644 --- a/tests/unit/unit1305.c +++ b/tests/unit/unit1305.c @@ -128,6 +128,7 @@ UNITTEST_START abort_unless(rc == CURLE_OK, "data node creation failed"); key_len = strlen(data_key); + data_node->inuse = 1; /* hash will hold the reference */ nodep = Curl_hash_add(hp, data_key, key_len+1, data_node); abort_unless(nodep, "insertion into hash failed"); /* Freeing will now be done by Curl_hash_destroy */ -- cgit v1.2.3