]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
pdnsutil add/replace record: do not end transaction before we are done with it
authorPeter van Dijk <peter.van.dijk@powerdns.com>
Fri, 15 Nov 2019 12:01:24 +0000 (13:01 +0100)
committermind04 <mind04@monshouwer.org>
Thu, 21 Nov 2019 23:10:17 +0000 (00:10 +0100)
pdns/pdnsutil.cc

index 25b09dbafb82b09189508bee1904c0a7638bd4fc..efb9378419f32911d32be46ec6aa5c792877c341 100644 (file)
@@ -1250,11 +1250,11 @@ int addOrReplaceRecord(bool addOrReplace, const vector<string>& cmds) {
   di.backend->replaceRRSet(di.id, name, rr.qtype, newrrs);
   // need to be explicit to bypass the ueberbackend cache!
   di.backend->lookup(rr.qtype, name, 0, di.id);
-  di.backend->commitTransaction();
   cout<<"New rrset:"<<endl;
   while(di.backend->get(rr)) {
     cout<<rr.qname.toString()<<" "<<rr.ttl<<" IN "<<rr.qtype.getName()<<" "<<rr.content<<endl;
   }
+  di.backend->commitTransaction();
   return EXIT_SUCCESS;
 }