]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
httpsrr: fix the HTTPS-RR threaded-resolver build combo
authorDaniel Stenberg <daniel@haxx.se>
Thu, 20 Feb 2025 07:31:33 +0000 (08:31 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 20 Feb 2025 08:40:53 +0000 (09:40 +0100)
Reported-by: Viktor Szakats
Fixes #16399
Closes #16404

lib/asyn.h
lib/httpsrr.c

index d70bc86aaf3d46448c1b5346fe4b230685c8ef50..b963da533ceca1bfc027bf21f7594b63b32a07b9 100644 (file)
@@ -64,6 +64,7 @@ struct thread_data {
 #if defined(USE_HTTPSRR) && defined(USE_ARES)
   struct Curl_https_rrinfo hinfo;
   ares_channel channel;
+  int num_pending; /* number of outstanding c-ares requests */
 #endif
   bool init;
 };
index 7a2ecdbe4dc2fcf8d0d678a5de523548bc3b65c6..9a0bc827ef8156c8e15703ae1d4e92055dae4302 100644 (file)
@@ -187,11 +187,9 @@ void Curl_dnsrec_done_cb(void *arg, ares_status_t status,
   struct Curl_easy *data = arg;
   CURLcode result = CURLE_OK;
   size_t i;
-#ifdef CURLRES_ARES
   struct thread_data *res = &data->state.async.thdata;
 
   res->num_pending--;
-#endif
   (void)timeouts;
   if((ARES_SUCCESS != status) || !dnsrec)
     return;