seems to correct some host cache screw-ups I could reproduce.
user.cache_timeout = cache_timeout;
user.now = now;
-
+
Curl_hash_clean_with_criterium(hostcache,
(void *) &user,
hostcache_timestamp_remove);
rc = 0;
}
}
- else
+ else {
+ dns->inuse++; /* we use it! */
rc = 0;
+ }
*entry = dns;
dns->inuse--;
+#ifdef CURLDEBUG
+ if(dns->inuse < 0) {
+ infof(data, "Interal host cache screw-up!");
+ *(char **)0=NULL;
+ }
+#endif
+
if(data->share)
Curl_share_unlock(data, CURL_LOCK_DATA_DNS);
-
}
/*