]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Merge pull request #9236 from omoerbeek/cachecleaner-cleanup
authorRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 18 Jun 2020 15:41:57 +0000 (17:41 +0200)
committerGitHub <noreply@github.com>
Thu, 18 Jun 2020 15:41:57 +0000 (17:41 +0200)
Cleanup cache cleaner pruneCollection function

1  2 
pdns/recursordist/negcache.cc
pdns/recursordist/negcache.hh

Simple merge
index 0b5ecffca90a5434cde6861dc7abd02e7b89d256,249725a375dcee3e1af3981f86c170178c45cbd1..0b0acb5d28068529c2ae51319a560ae4ec8b1acd
@@@ -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<uint32_t> 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);