From: Kees Monshouwer Date: Fri, 20 Sep 2019 13:13:26 +0000 (+0200) Subject: auth: cleanup slave-renotify code X-Git-Tag: dnsdist-1.4.0-rc3~12^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e8cb07bb9c559c22415bc142cbcc79e31611c26d;p=pdns auth: cleanup slave-renotify code --- diff --git a/pdns/slavecommunicator.cc b/pdns/slavecommunicator.cc index c6b08fefc..31ae46285 100644 --- a/pdns/slavecommunicator.cc +++ b/pdns/slavecommunicator.cc @@ -598,22 +598,20 @@ void CommunicatorClass::suck(const DNSName &domain, const ComboAddress& remote) di.backend->setFresh(zs.domain_id); purgeAuthCaches(domain.toString()+"$"); - g_log< meta; - if (B.getDomainMetadata(domain, "SLAVE-RENOTIFY", meta) && meta.size() > 0) { - if (meta[0] == "1") { - renotify = true; - } else { - renotify = false; - } + if(B.getDomainMetadata(domain, "SLAVE-RENOTIFY", meta ) && !meta.empty()) { + notify=(meta.front() == "1"); + } else { + notify=(::arg().mustDo("slave-renotify")); } - if(renotify) + if(notify) { notifyDomain(domain, &B); + } + } catch(DBException &re) { g_log<