bool TSIGGrantsAccess(const DNSName& zone, const DNSName& keyname);
bool getTSIGForAccess(const DNSName& zone, const string& master, DNSName* keyname);
- void startTransaction()
+ void startTransaction(const DNSName& zone, int zone_id)
{
- (*d_keymetadb->backends.begin())->startTransaction(DNSName(), -1);
+ (*d_keymetadb->backends.begin())->startTransaction(zone, zone_id);
}
void commitTransaction()
cerr<<"Non DNSSEC zone, only adding empty non-terminals"<<endl;
if(doTransaction)
- sd.db->startTransaction(DNSName(""), -1);
+ sd.db->startTransaction(zone, -1);
bool realrr=true;
uint32_t maxent = ::arg().asNum("max-ent-entries");
}
rrs[0].content = serializeSOAData(sd);
- sd.db->startTransaction(DNSName(), -1);
+ sd.db->startTransaction(zone, -1);
if (! sd.db->replaceRRSet(sd.domain_id, zone, rr.qtype, rrs)) {
sd.db->abortTransaction();
return 0;
}
vector<DNSName> mustRectify;
- dk.startTransaction();
unsigned int zoneErrors=0;
for(unsigned int n = 1; n < cmds.size(); ++n) {
DNSName zone(cmds[n]);
+ dk.startTransaction(zone, -1);
if(secureZone(dk, zone)) {
mustRectify.push_back(zone);
} else {
zoneErrors++;
}
+ dk.commitTransaction();
}
- dk.commitTransaction();
for(const auto& zone : mustRectify)
rectifyZone(dk, zone);