]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
lib: clear up CURLRES_ASYNCH vs USE_CURL_ASYNC use
authorDaniel Stenberg <daniel@haxx.se>
Mon, 10 Mar 2025 10:55:01 +0000 (11:55 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 10 Mar 2025 12:15:20 +0000 (13:15 +0100)
CURLRES_ASYNCH - is for when built to use an async name resolver; threaded or
c-ares

USE_CURL_ASYNC - is for when built to use either an async name resolver OR DoH

Reported-by: Lars Karlitski
Fixes #16645
Closes #16648

lib/hostip.c
lib/multi.c
lib/socks.c
lib/urldata.h

index 99da27403fb091d37cadc4a192bf575ee3a2fad9..e335ca0fc7af9d929a41767c44317c86705636ff 100644 (file)
@@ -747,7 +747,7 @@ enum resolve_t Curl_resolv(struct Curl_easy *data,
       int st;
       Curl_set_in_callback(data, TRUE);
       st = data->set.resolver_start(
-#ifdef USE_CURL_ASYNC
+#ifdef CURLRES_ASYNCH
         data->state.async.resolver,
 #else
         NULL,
index f34758070212bf32bdcee607a0c3d7e77e12d60b..b5bb9fd5030d468b73d7c646ccbaa8650f454d45 100644 (file)
@@ -2087,7 +2087,7 @@ static CURLMcode state_resolving(struct Curl_multi *multi,
   dns = Curl_fetch_addr(data, hostname, conn->primary.remote_port);
 
   if(dns) {
-#ifdef CURLRES_ASYNCH
+#ifdef USE_CURL_ASYNC
     data->state.async.dns = dns;
     data->state.async.done = TRUE;
 #endif
index cb198df1ce96954d2126803770003c2239504a25..0ef6b140ae4b301d7371279b3c2b76919e3425a1 100644 (file)
@@ -344,7 +344,7 @@ static CURLproxycode do_SOCKS4(struct Curl_cfilter *cf,
     dns = Curl_fetch_addr(data, sx->hostname, conn->primary.remote_port);
 
     if(dns) {
-#ifdef CURLRES_ASYNCH
+#ifdef USE_CURL_ASYNC
       data->state.async.dns = dns;
       data->state.async.done = TRUE;
 #endif
@@ -814,7 +814,7 @@ CONNECT_REQ_INIT:
     dns = Curl_fetch_addr(data, sx->hostname, sx->remote_port);
 
     if(dns) {
-#ifdef CURLRES_ASYNCH
+#ifdef USE_CURL_ASYNC
       data->state.async.dns = dns;
       data->state.async.done = TRUE;
 #endif
index f22903f64f755b8e1c3e2414f3386f8369cafc31..889d6029ef88f6fdc35a48a3f7238f8f8d99f3b4 100644 (file)
@@ -569,9 +569,9 @@ struct Curl_async {
   struct Curl_dns_entry *dns;
 #ifdef CURLRES_ASYNCH
   struct thread_data thdata;
-#endif
   void *resolver; /* resolver state, if it is used in the URL state -
                      ares_channel e.g. */
+#endif
   int port;
   BIT(done);  /* set TRUE when the lookup is complete */
 };