fixed the Curl_resolv()'s return code when the looked up host was already
in the cache (Vincent Bronner)
This commit is contained in:
parent
d2f7037ff7
commit
2d567af069
@ -348,8 +348,7 @@ int Curl_resolv(struct connectdata *conn,
|
|||||||
rc = 1; /* no info yet */
|
rc = 1; /* no info yet */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
if(data->share)
|
if(data->share)
|
||||||
Curl_share_lock(data, CURL_LOCK_DATA_DNS, CURL_LOCK_ACCESS_SINGLE);
|
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)
|
if(data->share)
|
||||||
Curl_share_unlock(data, CURL_LOCK_DATA_DNS);
|
Curl_share_unlock(data, CURL_LOCK_DATA_DNS);
|
||||||
|
|
||||||
if(!dns) {
|
if(!dns)
|
||||||
/* returned failure, bail out nicely */
|
/* returned failure, bail out nicely */
|
||||||
Curl_freeaddrinfo(addr);
|
Curl_freeaddrinfo(addr);
|
||||||
}
|
|
||||||
else
|
else
|
||||||
rc = 0;
|
rc = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
rc = 0;
|
||||||
|
|
||||||
*entry = dns;
|
*entry = dns;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user