Renamed a variable to avoid shadowing a global declarations.
This commit is contained in:
parent
ef3b425b11
commit
8388366849
12
lib/hostip.c
12
lib/hostip.c
@ -398,7 +398,6 @@ int Curl_resolv(struct connectdata *conn,
|
|||||||
char *entry_id = NULL;
|
char *entry_id = NULL;
|
||||||
struct Curl_dns_entry *dns = NULL;
|
struct Curl_dns_entry *dns = NULL;
|
||||||
size_t entry_len;
|
size_t entry_len;
|
||||||
int wait;
|
|
||||||
struct SessionHandle *data = conn->data;
|
struct SessionHandle *data = conn->data;
|
||||||
CURLcode result;
|
CURLcode result;
|
||||||
int rc;
|
int rc;
|
||||||
@ -447,19 +446,20 @@ int Curl_resolv(struct connectdata *conn,
|
|||||||
/* The entry was not in the cache. Resolve it to IP address */
|
/* The entry was not in the cache. Resolve it to IP address */
|
||||||
|
|
||||||
Curl_addrinfo *addr;
|
Curl_addrinfo *addr;
|
||||||
|
int respwait;
|
||||||
|
|
||||||
/* Check what IP specifics the app has requested and if we can provide it.
|
/* Check what IP specifics the app has requested and if we can provide it.
|
||||||
* If not, bail out. */
|
* If not, bail out. */
|
||||||
if(!Curl_ipvalid(data))
|
if(!Curl_ipvalid(data))
|
||||||
return CURLRESOLV_ERROR;
|
return CURLRESOLV_ERROR;
|
||||||
|
|
||||||
/* If Curl_getaddrinfo() returns NULL, 'wait' might be set to a non-zero
|
/* If Curl_getaddrinfo() returns NULL, 'respwait' might be set to a
|
||||||
value indicating that we need to wait for the response to the resolve
|
non-zero value indicating that we need to wait for the response to the
|
||||||
call */
|
resolve call */
|
||||||
addr = Curl_getaddrinfo(conn, hostname, port, &wait);
|
addr = Curl_getaddrinfo(conn, hostname, port, &respwait);
|
||||||
|
|
||||||
if (!addr) {
|
if (!addr) {
|
||||||
if(wait) {
|
if(respwait) {
|
||||||
/* the response to our resolve call will come asynchronously at
|
/* the response to our resolve call will come asynchronously at
|
||||||
a later time, good or bad */
|
a later time, good or bad */
|
||||||
/* First, check that we haven't received the info by now */
|
/* First, check that we haven't received the info by now */
|
||||||
|
Loading…
Reference in New Issue
Block a user