From 4c8a22954adbafbe74e990b87ff88660a61a2141 Mon Sep 17 00:00:00 2001 From: bert hubert Date: Thu, 5 Nov 2015 20:54:05 +0100 Subject: [PATCH] remove dottedEndsOn for strings --- pdns/misc.cc | 20 -------------------- pdns/misc.hh | 1 - 2 files changed, 21 deletions(-) diff --git a/pdns/misc.cc b/pdns/misc.cc index ea4b3f6cd..0b2f7c8ad 100644 --- a/pdns/misc.cc +++ b/pdns/misc.cc @@ -230,26 +230,6 @@ bool dottedEndsOn(const DNSName &domain, const DNSName &suffix) } -/** does domain end on suffix? Is smart about "wwwds9a.nl" "ds9a.nl" not matching */ -bool dottedEndsOn(const string &domain, const string &suffix) -{ - if( suffix=="." || ciEqual(domain, suffix) ) - return true; - - if(domain.size()<=suffix.size()) - return false; - - string::size_type dpos=domain.size()-suffix.size()-1, spos=0; - - if(domain[dpos++]!='.') - return false; - - for(; dpos < domain.size(); ++dpos, ++spos) - if(dns_tolower(domain[dpos]) != dns_tolower(suffix[spos])) - return false; - - return true; -} static void parseService4(const string &descr, ServiceTuple &st) { diff --git a/pdns/misc.hh b/pdns/misc.hh index b72016a0e..3697af4f6 100644 --- a/pdns/misc.hh +++ b/pdns/misc.hh @@ -56,7 +56,6 @@ bool chopOffDotted(string &domain); bool endsOn(const string &domain, const string &suffix); bool dottedEndsOn(const DNSName &domain, const DNSName &suffix); // REMOVE ME -bool dottedEndsOn(const string &domain, const string &suffix); string nowTime(); const string unquotify(const string &item); string humanDuration(time_t passed); -- 2.40.0