From: Otto Moerbeek Date: Fri, 13 Oct 2023 13:39:05 +0000 (+0200) Subject: Only set additionalsNotInCache in the true case X-Git-Tag: rec-5.0.0-alpha2~5^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5fd8b32b553c0358f613b00fce01bdc82393e1a5;p=thirdparty%2Fpdns.git Only set additionalsNotInCache in the true case --- diff --git a/pdns/logging.hh b/pdns/logging.hh index 0ddf6beae1..637e97d67e 100644 --- a/pdns/logging.hh +++ b/pdns/logging.hh @@ -203,14 +203,14 @@ extern bool g_slogStructured; // startupLog->error("No such file", "Unable to parse configuration file", "config_file", Logging::Loggable(configname)); // #define SLOG(oldStyle, slogCall) \ - do { \ + if (true) { \ if (g_slogStructured) { \ slogCall; \ } \ else { \ oldStyle; \ } \ - } while (0); + } #else // No structured logging (e.g. auth) #define SLOG(oldStyle, slogCall) \ diff --git a/pdns/recursordist/syncres.cc b/pdns/recursordist/syncres.cc index 229db97412..f7c56a4e21 100644 --- a/pdns/recursordist/syncres.cc +++ b/pdns/recursordist/syncres.cc @@ -620,7 +620,9 @@ void SyncRes::resolveAdditionals(const DNSName& qname, QType qtype, AdditionalMo } } // Not found in cache, check negcache and push task if also not in negcache - additionalsNotInCache = pushResolveIfNotInNegCache(qname, qtype, d_now); + if (pushResolveIfNotInNegCache(qname, qtype, d_now)) { + additionalsNotInCache = true; + } break; } case AdditionalMode::Ignore: