From: Kees Monshouwer Date: Sun, 23 Feb 2014 00:07:40 +0000 (+0100) Subject: saxfr: remove hidesoadetails and add showdetails option X-Git-Tag: rec-3.6.0-rc1~169^2~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=75b16c22d986955b5b4cf1f8cb9796e612e59d3c;p=thirdparty%2Fpdns.git saxfr: remove hidesoadetails and add showdetails option --- diff --git a/pdns/saxfr.cc b/pdns/saxfr.cc index 7fa81edb68..53f0108529 100644 --- a/pdns/saxfr.cc +++ b/pdns/saxfr.cc @@ -14,20 +14,20 @@ int main(int argc, char** argv) try { if(argc < 4) { - cerr<<"Syntax: saxfr IP-address port zone [showflags] [hidesoadetails] [unhash]"< 4) { for(int i=4; ifirst.d_type); - if(i->first.d_type == QType::RRSIG) + if(showdetails) + { + o<<"\t"<first.d_ttl<<"\t"<< i->first.d_content->getZoneRepresentation(); + } + else if(i->first.d_type == QType::RRSIG) { string zoneRep = i->first.d_content->getZoneRepresentation(); vector parts; @@ -95,7 +99,7 @@ try string zoneRep = i->first.d_content->getZoneRepresentation(); vector parts; stringtok(parts, zoneRep); - o<<"\t"<first.d_ttl<<"\t"<< parts[0]<<" [flags] "<first.d_ttl<<"\t"<< parts[0]<<" [flags] "<::iterator iter = parts.begin()+5; iter != parts.end(); ++iter) o<<" "<<*iter; } @@ -106,13 +110,6 @@ try stringtok(parts, zoneRep); o<<"\t"<first.d_ttl<<"\t"<< parts[0]<<" "<first.d_type == QType::SOA && hidesoadetails) - { - string zoneRep = i->first.d_content->getZoneRepresentation(); - vector parts; - stringtok(parts, zoneRep); - o<<"\t"<first.d_ttl<<"\t"<first.d_ttl<<"\t"<< i->first.d_content->getZoneRepresentation();