]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
fix getDomainInfo(), d_result is gone after getSOA 1026/head
authorKees Monshouwer <mind04@monshouwer.org>
Wed, 18 Sep 2013 00:48:45 +0000 (02:48 +0200)
committermind04 <mind04@monshouwer.org>
Wed, 18 Sep 2013 00:51:23 +0000 (02:51 +0200)
pdns/backends/gsql/gsqlbackend.cc
pdns/pdnssec.cc

index 737a0a858cba1374136e411309eb85989451683f..97e85cab15b808d174a204af5c7434cd9e74c13a 100644 (file)
@@ -128,6 +128,7 @@ bool GSQLBackend::getDomainInfo(const string &domain, DomainInfo &di)
   stringtok(di.masters, d_result[0][2], " ,\t");
   di.last_check=atol(d_result[0][3].c_str());
   di.notified_serial = atol(d_result[0][4].c_str());
+  string type=d_result[0][5];
   di.backend=this;
 
   di.serial = 0;
@@ -142,7 +143,6 @@ bool GSQLBackend::getDomainInfo(const string &domain, DomainInfo &di)
     L<<Logger::Error<<"Error retrieving serial for '"<<domain<<"': "<<ae.reason<<endl;
   }
 
-  string type=d_result[0][5];
   if(pdns_iequals(type,"SLAVE"))
     di.kind=DomainInfo::Slave;
   else if(pdns_iequals(type,"MASTER"))
index 8abcb8e3e33f5204d5e8887105114b0cfd7ae38a..1bc124d4a68d10a48b7db2af89f1e64a9c80bfe3 100644 (file)
@@ -154,6 +154,7 @@ void loadMainConfig(const std::string& configdir)
   ::arg().set("negquery-cache-ttl","Seconds to store negative query results in the QueryCache")="60";
   ::arg().set("query-cache-ttl","Seconds to store query results in the QueryCache")="20";              
   ::arg().set("default-soa-name","name to insert in the SOA record if none set in the backend")="a.misconfigured.powerdns.server";
+  ::arg().set("default-soa-mail","mail address to insert in the SOA record if none set in the backend")="";
   ::arg().set("soa-refresh-default","Default SOA refresh")="10800";
   ::arg().set("soa-retry-default","Default SOA retry")="3600";
   ::arg().set("soa-expire-default","Default SOA expire")="604800";