hostip: remove conn->data from resolver functions

This also moves the 'async' struct from the connectdata struct into the
Curl_easy struct, which seems like a better home for it.

Closes #6497
This commit is contained in:
Daniel Stenberg 2021-01-20 10:15:43 +01:00
parent d3a3bdb5ef
commit 8335c6417e
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
18 changed files with 242 additions and 254 deletions

View file

@ -89,7 +89,7 @@ bool Curl_ipvalid(struct Curl_easy *data, struct connectdata *conn)
* flavours have thread-safe versions of the plain gethostbyname() etc.
*
*/
struct Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
struct Curl_addrinfo *Curl_getaddrinfo(struct Curl_easy *data,
const char *hostname,
int port,
int *waitp)
@ -97,14 +97,14 @@ struct Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn,
struct Curl_addrinfo *ai = NULL;
#ifdef CURL_DISABLE_VERBOSE_STRINGS
(void)conn;
(void)data;
#endif
*waitp = 0; /* synchronous response only */
ai = Curl_ipv4_resolve_r(hostname, port);
if(!ai)
infof(conn->data, "Curl_ipv4_resolve_r failed for %s\n", hostname);
infof(data, "Curl_ipv4_resolve_r failed for %s\n", hostname);
return ai;
}