diff options
author | Daniel Stenberg <daniel@haxx.se> | 2021-01-20 10:15:43 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-01-22 08:25:09 +0100 |
commit | 8335c6417ea21bdfc340f0cb8cab5dbc97b10a2e (patch) | |
tree | 3f2651a3e000016fdef00707917e0e8e394b5dbe /lib/hostip.h | |
parent | d3a3bdb5ef867e270f4be205f36024ad1e48beb3 (diff) | |
download | curl-8335c6417ea21bdfc340f0cb8cab5dbc97b10a2e.tar.gz |
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
Diffstat (limited to 'lib/hostip.h')
-rw-r--r-- | lib/hostip.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/hostip.h b/lib/hostip.h index 60e0b7795..6deeb9f9c 100644 --- a/lib/hostip.h +++ b/lib/hostip.h @@ -85,12 +85,12 @@ enum resolve_t { CURLRESOLV_RESOLVED = 0, CURLRESOLV_PENDING = 1 }; -enum resolve_t Curl_resolv(struct connectdata *conn, +enum resolve_t Curl_resolv(struct Curl_easy *data, const char *hostname, int port, bool allowDOH, struct Curl_dns_entry **dnsentry); -enum resolve_t Curl_resolv_timeout(struct connectdata *conn, +enum resolve_t Curl_resolv_timeout(struct Curl_easy *data, const char *hostname, int port, struct Curl_dns_entry **dnsentry, timediff_t timeoutms); @@ -117,7 +117,7 @@ bool Curl_ipvalid(struct Curl_easy *data, struct connectdata *conn); * name resolve layers (selected at build-time). They all take this same set * of arguments */ -struct Curl_addrinfo *Curl_getaddrinfo(struct connectdata *conn, +struct Curl_addrinfo *Curl_getaddrinfo(struct Curl_easy *data, const char *hostname, int port, int *waitp); @@ -148,7 +148,7 @@ int curl_dogetnameinfo(GETNAMEINFO_QUAL_ARG1 GETNAMEINFO_TYPE_ARG1 sa, /* IPv4 threadsafe resolve function used for synch and asynch builds */ struct Curl_addrinfo *Curl_ipv4_resolve_r(const char *hostname, int port); -CURLcode Curl_once_resolved(struct connectdata *conn, bool *protocol_connect); +CURLcode Curl_once_resolved(struct Curl_easy *data, bool *protocol_connect); /* * Curl_addrinfo_callback() is used when we build with any asynch specialty. @@ -156,7 +156,7 @@ CURLcode Curl_once_resolved(struct connectdata *conn, bool *protocol_connect); * status is CURL_ASYNC_SUCCESS. Twiddles fields in conn to indicate async * request completed whether successful or failed. */ -CURLcode Curl_addrinfo_callback(struct connectdata *conn, +CURLcode Curl_addrinfo_callback(struct Curl_easy *data, int status, struct Curl_addrinfo *ai); @@ -240,10 +240,9 @@ void Curl_hostcache_clean(struct Curl_easy *data, struct Curl_hash *hash); * Populate the cache with specified entries from CURLOPT_RESOLVE. */ CURLcode Curl_loadhostpairs(struct Curl_easy *data); - -CURLcode Curl_resolv_check(struct connectdata *conn, +CURLcode Curl_resolv_check(struct Curl_easy *data, struct Curl_dns_entry **dns); -int Curl_resolv_getsock(struct connectdata *conn, +int Curl_resolv_getsock(struct Curl_easy *data, curl_socket_t *socks); #endif /* HEADER_CURL_HOSTIP_H */ |