From 7da0574835fd26b5b7a59b49de4f85909c8004b5 Mon Sep 17 00:00:00 2001 From: Aki Tuomi Date: Sun, 8 Nov 2015 13:01:45 +0200 Subject: [PATCH] Use zone name in startTransaction --- pdns/dnsseckeeper.hh | 4 ++-- pdns/pdnssec.cc | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pdns/dnsseckeeper.hh b/pdns/dnsseckeeper.hh index aa056adc1..a702b58aa 100644 --- a/pdns/dnsseckeeper.hh +++ b/pdns/dnsseckeeper.hh @@ -98,9 +98,9 @@ public: 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() diff --git a/pdns/pdnssec.cc b/pdns/pdnssec.cc index 6d6f42cd3..3b6c6ee00 100644 --- a/pdns/pdnssec.cc +++ b/pdns/pdnssec.cc @@ -240,7 +240,7 @@ bool rectifyZone(DNSSECKeeper& dk, const DNSName& zone) cerr<<"Non DNSSEC zone, only adding empty non-terminals"<startTransaction(DNSName(""), -1); + sd.db->startTransaction(zone, -1); bool realrr=true; uint32_t maxent = ::arg().asNum("max-ent-entries"); @@ -738,7 +738,7 @@ int increaseSerial(const DNSName& zone, DNSSECKeeper &dk) } 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(); @@ -1763,18 +1763,18 @@ try return 0; } vector 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); -- 2.40.0