mirror of
https://github.com/curl/curl.git
synced 2026-04-15 01:21:44 +03:00
asyn-thrdd: fix Curl_async_getaddrinfo() on systems without getaddrinfo
Follow-up toce06fe7771Bug:ce06fe7771 (r172215567)Reported-by: Harry Sintonen Closes #19859
This commit is contained in:
parent
0b5ece553c
commit
f4b56f34ba
1 changed files with 4 additions and 10 deletions
|
|
@ -725,24 +725,18 @@ CURLcode Curl_async_pollset(struct Curl_easy *data, struct easy_pollset *ps)
|
|||
/*
|
||||
* Curl_async_getaddrinfo() - for platforms without getaddrinfo
|
||||
*/
|
||||
struct Curl_addrinfo *Curl_async_getaddrinfo(struct Curl_easy *data,
|
||||
const char *hostname,
|
||||
int port,
|
||||
int ip_version,
|
||||
int *waitp)
|
||||
CURLcode Curl_async_getaddrinfo(struct Curl_easy *data, const char *hostname,
|
||||
int port, int ip_version)
|
||||
{
|
||||
(void)ip_version;
|
||||
*waitp = 0; /* default to synchronous response */
|
||||
|
||||
/* fire up a new resolver thread! */
|
||||
if(async_thrdd_init(data, hostname, port, ip_version, NULL)) {
|
||||
*waitp = 1; /* expect asynchronous response */
|
||||
return NULL;
|
||||
return CURLE_OK;
|
||||
}
|
||||
|
||||
failf(data, "getaddrinfo() thread failed");
|
||||
|
||||
return NULL;
|
||||
return CURLE_FAILED_INIT;
|
||||
}
|
||||
|
||||
#else /* !HAVE_GETADDRINFO */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue