Permalink
Browse files

output warning message when no to be notified NS's are found

fixes #926
  • Loading branch information...
1 parent ec2b2d4 commit 088c3342026cf9c1be24201d4ca9a70443236323 Ruben d'Arco committed Jul 29, 2013
Showing with 6 additions and 0 deletions.
  1. +6 −0 pdns/mastercommunicator.cc
@@ -39,6 +39,7 @@
void CommunicatorClass::queueNotifyDomain(const string &domain, DNSBackend *B)
{
+ bool hasQueuedItem=false;
set<string> ips;
FindNS fns;
@@ -60,14 +61,19 @@ void CommunicatorClass::queueNotifyDomain(const string &domain, DNSBackend *B)
for(set<string>::const_iterator j=ips.begin();j!=ips.end();++j) {
L<<Logger::Warning<<"Queued notification of domain '"<<domain<<"' to "<<*j<<endl;
d_nq.add(domain,*j);
+ hasQueuedItem=true;
}
set<string>alsoNotify;
B->alsoNotifies(domain, &alsoNotify);
for(set<string>::const_iterator j=alsoNotify.begin();j!=alsoNotify.end();++j) {
L<<Logger::Warning<<"Queued also-notification of domain '"<<domain<<"' to "<<*j<<endl;
d_nq.add(domain,*j);
+ hasQueuedItem=true;
}
+ if (!hasQueuedItem)
+ L<<Logger::Warning<<"Request to queue notification for domain '"<<domain<<"' was processed, but no nameservers or also-notify's found. Not notifying!"<<endl;
+
}
bool CommunicatorClass::notifyDomain(const string &domain)

0 comments on commit 088c334

Please sign in to comment.