From: Remi Gacogne Date: Thu, 18 Jun 2020 15:41:57 +0000 (+0200) Subject: Merge pull request #9236 from omoerbeek/cachecleaner-cleanup X-Git-Tag: dnsdist-1.5.0-rc4~20 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f2d54e975f0187bc889063e97cb58d8c6898a24f;p=thirdparty%2Fpdns.git Merge pull request #9236 from omoerbeek/cachecleaner-cleanup Cleanup cache cleaner pruneCollection function --- f2d54e975f0187bc889063e97cb58d8c6898a24f diff --cc pdns/recursordist/negcache.hh index 0b5ecffca9,249725a375..0b0acb5d28 --- a/pdns/recursordist/negcache.hh +++ b/pdns/recursordist/negcache.hh @@@ -64,11 -64,11 +64,11 @@@ public void add(const NegCacheEntry& ne); void updateValidationStatus(const DNSName& qname, const QType& qtype, const vState newState, boost::optional capTTD); - bool get(const DNSName& qname, const QType& qtype, const struct timeval& now, const NegCacheEntry** ne, bool typeMustMatch = false); - bool getRootNXTrust(const DNSName& qname, const struct timeval& now, const NegCacheEntry** ne); + bool get(const DNSName& qname, const QType& qtype, const struct timeval& now, NegCacheEntry& ne, bool typeMustMatch = false); + bool getRootNXTrust(const DNSName& qname, const struct timeval& now, NegCacheEntry& ne); uint64_t count(const DNSName& qname) const; uint64_t count(const DNSName& qname, const QType qtype) const; - void prune(unsigned int maxEntries); + void prune(size_t maxEntries); void clear(); uint64_t dumpToFile(FILE* fd); uint64_t wipe(const DNSName& name, bool subtree = false);