]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
log error messages when creating a superslave domain, change how we deal with the...
authorBert Hubert <bert.hubert@netherlabs.nl>
Tue, 28 Aug 2012 21:14:36 +0000 (21:14 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Tue, 28 Aug 2012 21:14:36 +0000 (21:14 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@2703 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/packethandler.cc

index 6f0da29d381beb917735bb90f800b52a76a16a03..9b2bd79545daffe3c6cf3041e60c5379eb1f46e5 100644 (file)
@@ -783,7 +783,13 @@ int PacketHandler::trySuperMasterSynchronous(DNSPacket *p)
     L<<Logger::Error<<"Unable to find backend willing to host "<<p->qdomain<<" for potential supermaster "<<p->getRemote()<<endl;
     return RCode::Refused;
   }
-  db->createSlaveDomain(p->getRemote(),p->qdomain,account);
+  try {
+    db->createSlaveDomain(p->getRemote(),p->qdomain,account);
+  }
+  catch(AhuException& ae) {
+    L<<Logger::Error<<"Database error trying to create "<<p->qdomain<<" for potential supermaster "<<p->getRemote()<<": "<<ae.reason<<endl;
+    return RCode::ServFail;
+  }
   Communicator.addSuckRequest(p->qdomain, p->getRemote());  
   L<<Logger::Warning<<"Created new slave zone '"<<p->qdomain<<"' from supermaster "<<p->getRemote()<<", queued axfr"<<endl;
   return RCode::NoError;