From: Kees Monshouwer Date: Fri, 1 Aug 2014 07:34:00 +0000 (+0200) Subject: fix purge zone$ and lookup for labels with spaces X-Git-Tag: auth-3.4.0-rc1~3^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8403ade9fc1f581d33bd8ced1e6b8d4ef9fe2915;p=pdns fix purge zone$ and lookup for labels with spaces --- diff --git a/pdns/packetcache.cc b/pdns/packetcache.cc index 7db48e1fa..764280877 100644 --- a/pdns/packetcache.cc +++ b/pdns/packetcache.cc @@ -208,7 +208,7 @@ int PacketCache::purge(const string &match) cmap_t::const_iterator start=iter; for(; iter != d_map.end(); ++iter) { - if(!iter->qname.compare(0, zone.size(), zone)) { + if(iter->qname.compare(0, zone.size(), zone) != 0) { break; } delcount++; @@ -268,7 +268,7 @@ bool PacketCache::getEntryLocked(const string &qname, const QType& qtype, CacheE string PacketCache::pcReverse(const string &content) { string tmp = string(content.rbegin(), content.rend()); - return toLower(boost::replace_all_copy(tmp, ".", " "))+" "; + return toLower(boost::replace_all_copy(tmp, ".", "\t"))+"\t"; }