mirror of
https://github.com/curl/curl.git
synced 2026-04-26 05:22:12 +03:00
hostip: fix build with sync resolver
Reported-by: David Goerger
Follow-up from 8335c6417
Fixes #6566
Closes #6568
This commit is contained in:
parent
62d91e0078
commit
6cd167a0dc
1 changed files with 10 additions and 2 deletions
12
lib/hostip.c
12
lib/hostip.c
|
|
@ -520,8 +520,14 @@ enum resolve_t Curl_resolv(struct Curl_easy *data,
|
||||||
if(data->set.resolver_start) {
|
if(data->set.resolver_start) {
|
||||||
int st;
|
int st;
|
||||||
Curl_set_in_callback(data, true);
|
Curl_set_in_callback(data, true);
|
||||||
st = data->set.resolver_start(data->state.async.resolver, NULL,
|
st = data->set.resolver_start(
|
||||||
data->set.resolver_start_client);
|
#ifdef CURLRES_SYNCH
|
||||||
|
NULL,
|
||||||
|
#else
|
||||||
|
data->state.async.resolver,
|
||||||
|
#endif
|
||||||
|
NULL,
|
||||||
|
data->set.resolver_start_client);
|
||||||
Curl_set_in_callback(data, false);
|
Curl_set_in_callback(data, false);
|
||||||
if(st)
|
if(st)
|
||||||
return CURLRESOLV_ERROR;
|
return CURLRESOLV_ERROR;
|
||||||
|
|
@ -1102,10 +1108,12 @@ CURLcode Curl_once_resolved(struct Curl_easy *data, bool *protocol_done)
|
||||||
CURLcode result;
|
CURLcode result;
|
||||||
struct connectdata *conn = data->conn;
|
struct connectdata *conn = data->conn;
|
||||||
|
|
||||||
|
#ifndef CURLRES_SYNCH
|
||||||
if(data->state.async.dns) {
|
if(data->state.async.dns) {
|
||||||
conn->dns_entry = data->state.async.dns;
|
conn->dns_entry = data->state.async.dns;
|
||||||
data->state.async.dns = NULL;
|
data->state.async.dns = NULL;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
result = Curl_setup_conn(data, protocol_done);
|
result = Curl_setup_conn(data, protocol_done);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue