From: Aki Tuomi Date: Mon, 15 Jun 2015 19:11:47 +0000 (+0300) Subject: Use DNSName X-Git-Tag: dnsdist-1.0.0-alpha1~248^2~58^2~21^2~5^2~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=efa2cfa0e5e6775b3fd070c6b90586b94f00788a;p=thirdparty%2Fpdns.git Use DNSName --- diff --git a/pdns/bindparser.yy b/pdns/bindparser.yy index 4b9340e2fb..2fe5758a23 100644 --- a/pdns/bindparser.yy +++ b/pdns/bindparser.yy @@ -93,7 +93,7 @@ void BindParser::commit(BindDomainInfo DI) DI.filename=d_dir+"/"+DI.filename; if(d_verbose) - cerr<<"Domain "< masters; @@ -91,7 +91,7 @@ class BindParser private: string d_dir; bool d_verbose; - typedef map zonedomain_t; + typedef map zonedomain_t; set alsoNotify; vector d_zonedomains; }; diff --git a/pdns/zone2json.cc b/pdns/zone2json.cc index 72c51ddbc5..17cad46f47 100644 --- a/pdns/zone2json.cc +++ b/pdns/zone2json.cc @@ -200,7 +200,7 @@ try ++i) { if(i->type!="master" && i->type!="slave") { - cerr<<" Warning! Skipping '"<type<<"' zone '"<name<<"'"<type<<"' zone '"<name.toStringNoDot()<<"'"<filename, i->name, BP.getDirectory()); DNSResourceRecord rr; while(zpt.get(rr)) - lines.push_back(emitRecord(i->name, rr.qname, rr.qtype.getName(), rr.content, rr.ttl)); - cout << "{\"name\":\"" << i->name << "\",\"records\": "; + lines.push_back(emitRecord(i->name.toStringNoDot(), rr.qname.toStringNoDot(), rr.qtype.getName(), rr.content, rr.ttl)); + cout << "{\"name\":\"" << i->name.toStringNoDot() << "\",\"records\": "; emitJson(lines); cout << "},"; num_domainsdone++; @@ -238,7 +238,7 @@ try string zname; cout << "{\"name\":\"" << ::arg()["zone-name"] << "\",\"records\":"; while(zpt.get(rr)) - lines.push_back(emitRecord(::arg()["zone-name"], rr.qname, rr.qtype.getName(), rr.content, rr.ttl)); + lines.push_back(emitRecord(::arg()["zone-name"], rr.qname.toStringNoDot(), rr.qtype.getName(), rr.content, rr.ttl)); emitJson(lines); cout << "}\n"; num_domainsdone=1; diff --git a/pdns/zone2sql.cc b/pdns/zone2sql.cc index 9548d6cf58..dd1f1cd857 100644 --- a/pdns/zone2sql.cc +++ b/pdns/zone2sql.cc @@ -389,13 +389,13 @@ try ++i) { if(i->type!="master" && i->type!="slave") { - cerr<<" Warning! Skipping '"<type<<"' zone '"<name<<"'"<type<<"' zone '"<name.toStringNoDot()<<"'"<name, &(i->masters)); + emitDomain(i->name.toStringNoDot(), &(i->masters)); ZoneParserTNG zpt(i->filename, i->name, BP.getDirectory()); DNSResourceRecord rr; @@ -407,7 +407,7 @@ try if(rr.qtype.getCode() == QType::SOA) seenSOA=true; - emitRecord(i->name, rr.qname, rr.qtype.getName(), rr.content, rr.ttl, comment); + emitRecord(i->name.toStringNoDot(), rr.qname.toStringNoDot(), rr.qtype.getName(), rr.content, rr.ttl, comment); } num_domainsdone++; }