]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
asyn-thread: fix the returned bitmask from Curl_resolver_getsock
authorDaniel Stenberg <daniel@haxx.se>
Thu, 6 Feb 2025 22:01:55 +0000 (23:01 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 7 Feb 2025 08:49:14 +0000 (09:49 +0100)
It should use a bitwise OR, not an assignment so that it does not
override the c-ares bits.

Closes #16227

lib/asyn-thread.c

index 8d6a9deb4a1e53fa6aab10ccbc55e4ed5a179a4f..8383edad726d5a274e21c3d8eac0270f75d97a53 100644 (file)
@@ -688,7 +688,7 @@ int Curl_resolver_getsock(struct Curl_easy *data, curl_socket_t *socks)
   if(td) {
     /* return read fd to client for polling the DNS resolution status */
     socks[socketi] = td->tsd.sock_pair[0];
-    ret_val = GETSOCK_READSOCK(socketi);
+    ret_val |= GETSOCK_READSOCK(socketi);
   }
   else {
 #endif