]> granicus.if.org Git - pdns/commitdiff
output warning message when no to be notified NS's are found
authorRuben d'Arco <cyclops@prof-x.net>
Mon, 29 Jul 2013 20:17:33 +0000 (22:17 +0200)
committerRuben d'Arco <cyclops@prof-x.net>
Mon, 29 Jul 2013 20:17:33 +0000 (22:17 +0200)
fixes #926

pdns/mastercommunicator.cc

index c8cf3dbf28970c2204e74e3d0dc898db69f3c810..2c1e80762da510d7246c1292824a0a9102ff1ef0 100644 (file)
@@ -39,6 +39,7 @@
 
 void CommunicatorClass::queueNotifyDomain(const string &domain, DNSBackend *B)
 {
+  bool hasQueuedItem=false;
   set<string> ips;
   FindNS fns;
   
@@ -60,6 +61,7 @@ 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);
@@ -67,7 +69,11 @@ void CommunicatorClass::queueNotifyDomain(const string &domain, DNSBackend *B)
   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)