From: bert hubert Date: Wed, 7 Sep 2016 19:21:53 +0000 (+0200) Subject: make sure that zone2ldap encodes root as . X-Git-Tag: dnsdist-1.1.0-beta2~123^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=981c2f67a2303bb39ced766f55439741301b7f6b;p=thirdparty%2Fpdns.git make sure that zone2ldap encodes root as . --- diff --git a/pdns/zone2ldap.cc b/pdns/zone2ldap.cc index bbb65f2fee..e17d2f2a63 100644 --- a/pdns/zone2ldap.cc +++ b/pdns/zone2ldap.cc @@ -83,8 +83,8 @@ static void callback_simple( unsigned int domain_id, const DNSName &domain, cons cout << "changetype: modify" << endl; cout << "add: " << qtype << "Record" << endl; } - - cout << qtype << "Record: " << stripDot( content ) << endl << endl; + string stripped=stripDot(content); + cout << qtype << "Record: " << stripped << ((stripped.empty() || stripped[stripped.size()-1]==' ') ? "." : "") << endl << endl; }