mirror of
https://github.com/curl/curl.git
synced 2026-07-25 10:38:04 +03:00
doh: remove conn->bits.doh
Since we have a new struct instance for each async operation now and async operation may happen in parallel, remove the connection bit indicating doh is in progress. Closes #21422
This commit is contained in:
parent
00cac453c7
commit
69f3a36bcb
3 changed files with 5 additions and 11 deletions
|
|
@ -457,14 +457,14 @@ CURLcode Curl_doh(struct Curl_easy *data,
|
|||
{
|
||||
CURLcode result = CURLE_OK;
|
||||
struct doh_probes *dohp = NULL;
|
||||
struct connectdata *conn = data->conn;
|
||||
size_t i;
|
||||
|
||||
DEBUGASSERT(conn);
|
||||
DEBUGASSERT(!async->doh);
|
||||
DEBUGASSERT(async->hostname[0]);
|
||||
if(async->doh)
|
||||
if(async->doh) {
|
||||
DEBUGASSERT(0); /* should not happen */
|
||||
Curl_doh_cleanup(data, async);
|
||||
}
|
||||
|
||||
/* start clean, consider allocating this struct on demand */
|
||||
async->doh = dohp = curlx_calloc(1, sizeof(struct doh_probes));
|
||||
|
|
@ -476,7 +476,6 @@ CURLcode Curl_doh(struct Curl_easy *data,
|
|||
curlx_dyn_init(&dohp->probe_resp[i].body, DYN_DOH_RESPONSE);
|
||||
}
|
||||
|
||||
conn->bits.doh = TRUE;
|
||||
dohp->host = async->hostname;
|
||||
dohp->port = async->port;
|
||||
/* We are making sub easy handles and want to be called back when
|
||||
|
|
|
|||
|
|
@ -424,7 +424,7 @@ static CURLcode hostip_resolv_take_result(struct Curl_easy *data,
|
|||
return CURLE_FAILED_INIT;
|
||||
|
||||
#ifndef CURL_DISABLE_DOH
|
||||
if(data->conn->bits.doh)
|
||||
if(async->doh)
|
||||
result = Curl_doh_take_result(data, async, pdns);
|
||||
else
|
||||
#endif
|
||||
|
|
@ -670,9 +670,7 @@ static CURLcode hostip_resolv(struct Curl_easy *data,
|
|||
*presolv_id = 0;
|
||||
*pdns = NULL;
|
||||
|
||||
#ifndef CURL_DISABLE_DOH
|
||||
data->conn->bits.doh = FALSE; /* default is not */
|
||||
#else
|
||||
#ifdef CURL_DISABLE_DOH
|
||||
(void)allowDOH;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -295,9 +295,6 @@ struct ConnectBits {
|
|||
BIT(multiplex); /* connection is multiplexed */
|
||||
BIT(tcp_fastopen); /* use TCP Fast Open */
|
||||
BIT(tls_enable_alpn); /* TLS ALPN extension? */
|
||||
#ifndef CURL_DISABLE_DOH
|
||||
BIT(doh);
|
||||
#endif
|
||||
#ifdef USE_UNIX_SOCKETS
|
||||
BIT(abstract_unix_socket);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue