diff options
author | Daniel Stenberg <daniel@haxx.se> | 2004-01-14 09:05:54 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2004-01-14 09:05:54 +0000 |
commit | 2d567af06950dc1654726d5d52518d81ae8a7f1d (patch) | |
tree | 4bb71d8547ca87e831f68101c1447afbb6806adc | |
parent | d2f7037ff74f68a4db53fe9ae15ddd447ed608db (diff) |
fixed the Curl_resolv()'s return code when the looked up host was already
in the cache (Vincent Bronner)
-rw-r--r-- | lib/hostip.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/hostip.c b/lib/hostip.c index 256ceebca..2509c9552 100644 --- a/lib/hostip.c +++ b/lib/hostip.c @@ -348,8 +348,7 @@ int Curl_resolv(struct connectdata *conn, rc = 1; /* no info yet */ } } - else - { + else { if(data->share) Curl_share_lock(data, CURL_LOCK_DATA_DNS, CURL_LOCK_ACCESS_SINGLE); @@ -359,15 +358,15 @@ int Curl_resolv(struct connectdata *conn, if(data->share) Curl_share_unlock(data, CURL_LOCK_DATA_DNS); - if(!dns) { + if(!dns) /* returned failure, bail out nicely */ Curl_freeaddrinfo(addr); - } else rc = 0; } } - + else + rc = 0; *entry = dns; |