← Commit list

29d0a308b4

Daniel Stenberg
Daniel Stenberg
2025-10-09
SUCCESS Duration: 154s

Subject

setopt: allow CURLOPT_DNS_CACHE_TIMEOUT set to -1

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/setopt.c+4 -1
@@ -879,7 +879,10 @@ static CURLcode setopt_long(struct Curl_easy *data, CURLoption option,
switch(option) {
case CURLOPT_DNS_CACHE_TIMEOUT:
- return setopt_set_timeout_sec(&s->dns_cache_timeout_ms, arg);
+ if(arg != -1)
+ return setopt_set_timeout_sec(&s->dns_cache_timeout_ms, arg);
+ s->dns_cache_timeout_ms = -1;
+ break;
case CURLOPT_CA_CACHE_TIMEOUT:
if(Curl_ssl_supports(data, SSLSUPP_CA_CACHE)) {