mirror of
https://github.com/curl/curl.git
synced 2026-07-29 22:58:04 +03:00
Revert "urldata: move async resolver state from easy handle to connectdata"
This reverts commit 56a4db2e4e (#12198)
We want the c-ares channel to be held in the easy handle, not per
connection - for performance.
Closes #12524
This commit is contained in:
parent
9f2d2290d1
commit
907eea0804
11 changed files with 138 additions and 155 deletions
12
lib/hostip.c
12
lib/hostip.c
|
|
@ -741,7 +741,7 @@ enum resolve_t Curl_resolv(struct Curl_easy *data,
|
|||
Curl_set_in_callback(data, true);
|
||||
st = data->set.resolver_start(
|
||||
#ifdef USE_CURL_ASYNC
|
||||
conn->resolve_async.resolver,
|
||||
data->state.async.resolver,
|
||||
#else
|
||||
NULL,
|
||||
#endif
|
||||
|
|
@ -1421,9 +1421,9 @@ CURLcode Curl_once_resolved(struct Curl_easy *data, bool *protocol_done)
|
|||
struct connectdata *conn = data->conn;
|
||||
|
||||
#ifdef USE_CURL_ASYNC
|
||||
if(conn->resolve_async.dns) {
|
||||
conn->dns_entry = conn->resolve_async.dns;
|
||||
conn->resolve_async.dns = NULL;
|
||||
if(data->state.async.dns) {
|
||||
conn->dns_entry = data->state.async.dns;
|
||||
data->state.async.dns = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -1445,11 +1445,11 @@ CURLcode Curl_once_resolved(struct Curl_easy *data, bool *protocol_done)
|
|||
#ifdef USE_CURL_ASYNC
|
||||
CURLcode Curl_resolver_error(struct Curl_easy *data)
|
||||
{
|
||||
struct connectdata *conn = data->conn;
|
||||
const char *host_or_proxy;
|
||||
CURLcode result;
|
||||
|
||||
#ifndef CURL_DISABLE_PROXY
|
||||
struct connectdata *conn = data->conn;
|
||||
if(conn->bits.httpproxy) {
|
||||
host_or_proxy = "proxy";
|
||||
result = CURLE_COULDNT_RESOLVE_PROXY;
|
||||
|
|
@ -1462,7 +1462,7 @@ CURLcode Curl_resolver_error(struct Curl_easy *data)
|
|||
}
|
||||
|
||||
failf(data, "Could not resolve %s: %s", host_or_proxy,
|
||||
conn->resolve_async.hostname);
|
||||
data->state.async.hostname);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue