From 17df2abf3bc6742a58c00f353d8ee8aa09708984 Mon Sep 17 00:00:00 2001 From: bert hubert Date: Mon, 25 Jan 2016 08:13:55 +0100 Subject: [PATCH] explicitly print the new rrset which should be.. educational --- pdns/pdnsutil.cc | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/pdns/pdnsutil.cc b/pdns/pdnsutil.cc index b8300bd92a..902ccb489a 100644 --- a/pdns/pdnsutil.cc +++ b/pdns/pdnsutil.cc @@ -1002,11 +1002,6 @@ int addOrReplaceRecord(bool addOrReplace, const vector& cmds) { else rr.ttl = ::arg().asNum("default-ttl"); } - for(auto i = contentStart ; i < cmds.size() ; ++i) { - rr.content = DNSRecordContent::mastermake(rr.qtype.getCode(), 1, cmds[i])->getZoneRepresentation(true); - newrrs.push_back(rr); - } - B.lookup(QType(QType::ANY), rr.qname, 0, di.id); bool found=false; if(rr.qtype.getCode() == QType::CNAME) { // this will save us SO many questions @@ -1031,8 +1026,23 @@ int addOrReplaceRecord(bool addOrReplace, const vector& cmds) { } } - di.backend->replaceRRSet(di.id, name, rr.qtype, newrrs); + if(!addOrReplace) { + cout<<"Current records for "<getZoneRepresentation(true); + + newrrs.push_back(rr); + } + + 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); + cout<<"New rrset:"<get(rr)) { + cout<