From: Pieter Lexis Date: Tue, 28 Jun 2016 10:51:22 +0000 (+0200) Subject: use implicit DNSName.toLogString() anmd correct dots in zone2json X-Git-Tag: rec-4.0.0~22^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39313d8ee701c618eb31446d3af52687203e3dcd;p=thirdparty%2Fpdns.git use implicit DNSName.toLogString() anmd correct dots in zone2json --- diff --git a/pdns/zone2json.cc b/pdns/zone2json.cc index edabe84beb..0f3e967664 100644 --- a/pdns/zone2json.cc +++ b/pdns/zone2json.cc @@ -69,7 +69,7 @@ static Json::object emitRecord(const string& zoneName, const DNSName &DNSqname, Json::object dict; - dict["name"] = DNSqname.toStringNoDot(); + dict["name"] = DNSqname.toString(); dict["type"] = qtype; dict["ttl"] = ttl; dict["prio"] = prio; @@ -167,7 +167,7 @@ try ++i) { if(i->type!="master" && i->type!="slave") { - cerr<<" Warning! Skipping '"<type<<"' zone '"<name.toString()<<"'"<type<<"' zone '"<name<<"'"<filename, i->name, BP.getDirectory()); DNSResourceRecord rr; - obj["name"] = i->name.toStringNoDot(); + obj["name"] = i->name.toString(); while(zpt.get(rr)) - recs.push_back(emitRecord(i->name.toStringNoDot(), rr.qname, rr.qtype.getName(), rr.content, rr.ttl)); + recs.push_back(emitRecord(i->name.toString(), rr.qname, rr.qtype.getName(), rr.content, rr.ttl)); obj["records"] = recs; Json tmp = obj; cout<