]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
The test for DNS cache entries left locked is now only built if
authorDaniel Stenberg <daniel@haxx.se>
Mon, 11 Nov 2002 22:51:09 +0000 (22:51 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 11 Nov 2002 22:51:09 +0000 (22:51 +0000)
AGGRESIVE_TEST is also defined, as an addition to MALLOCDEBUG. It doesn't
work for multi interface usage and should only be used with careful
consideration.

lib/hostip.c
lib/url.c

index 21b9103dd7551149c0366f06b09692d8639b1af5..ecefef1f7da7d03cf7c7557a7ad79757578d8c42 100644 (file)
@@ -191,7 +191,7 @@ hostcache_prune(curl_hash *hostcache, int cache_timeout, int now)
                                  hostcache_timestamp_remove);
 }
 
-#ifdef MALLOCDEBUG
+#if defined(MALLOCDEBUG) && defined(AGGRESIVE_TEST)
 /* Called from Curl_done() to check that there's no DNS cache entry with
    a non-zero counter left. */
 void Curl_scan_cache_used(void *user, void *ptr)
index 2b2e98d7086ada7d1365585a581b1c1f828dd682..50f83532e760f242adceb302204c312756040f7d 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -2854,7 +2854,7 @@ CURLcode Curl_done(struct connectdata *conn)
   if(conn->connect_addr)
     Curl_resolv_unlock(conn->connect_addr); /* done with this */
 
-#ifdef MALLOCDEBUG
+#if defined(MALLOCDEBUG) && defined(AGGRESIVE_TEST)
   /* scan for DNS cache entries still marked as in use */
   Curl_hash_apply(data->hostcache,
                   NULL, Curl_scan_cache_used);