From e8cb07bb9c559c22415bc142cbcc79e31611c26d Mon Sep 17 00:00:00 2001 From: Kees Monshouwer Date: Fri, 20 Sep 2019 15:13:26 +0200 Subject: [PATCH] auth: cleanup slave-renotify code --- pdns/slavecommunicator.cc | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/pdns/slavecommunicator.cc b/pdns/slavecommunicator.cc index c6b08fefcf..31ae46285f 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<