I made the torture test on test 530 go through. This was actually due to

silly code left from when we switched to let the multi handle "hold" the dns
cache when using the multi interface... Of course this only triggered when a
certain function call returned error at the correct moment.
This commit is contained in:
Daniel Stenberg
2008-01-15 22:15:55 +00:00
parent 19ae96f4d0
commit 56f17d2c9f
6 changed files with 42 additions and 17 deletions

View File

@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -127,14 +127,19 @@ static void freednsentry(void *freethis);
* Curl_global_host_cache_init() initializes and sets up a global DNS cache.
* 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.
*/
void Curl_global_host_cache_init(void)
int Curl_global_host_cache_init(void)
{
int rc = 0;
if(!host_cache_initialized) {
Curl_hash_init(&hostname_cache, 7, Curl_hash_str, Curl_str_key_compare,
freednsentry);
host_cache_initialized = 1;
rc = Curl_hash_init(&hostname_cache, 7, Curl_hash_str,
Curl_str_key_compare, freednsentry);
if(!rc)
host_cache_initialized = 1;
}
return rc;
}
/*