From 54ea3a27b4fb77b3d2c803f02497fb5f8622493c Mon Sep 17 00:00:00 2001 From: Bert Hubert Date: Sun, 8 Aug 2010 17:37:33 +0000 Subject: [PATCH] remove duplicate 'pleaseWipeCache' code git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1683 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- pdns/rec_channel_rec.cc | 2 +- pdns/reczones.cc | 10 ++-------- pdns/syncres.hh | 1 + 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/pdns/rec_channel_rec.cc b/pdns/rec_channel_rec.cc index 0ff62a230..aa579cc51 100644 --- a/pdns/rec_channel_rec.cc +++ b/pdns/rec_channel_rec.cc @@ -155,7 +155,7 @@ string doDumpEDNSStatus(T begin, T end) return "done\n"; } -static uint64_t* pleaseWipeCache(const std::string& canon) +uint64_t* pleaseWipeCache(const std::string& canon) { return new uint64_t(t_RC->doWipeCache(canon)); } diff --git a/pdns/reczones.cc b/pdns/reczones.cc index 0f1a75189..549bef43d 100644 --- a/pdns/reczones.cc +++ b/pdns/reczones.cc @@ -213,12 +213,6 @@ void convertServersForAD(const std::string& input, SyncRes::AuthDomain& ad, cons L<doWipeCache(qname); - return 0; -} - void* pleaseWipeNegCache() { t_sstorage->negcache.clear(); @@ -240,7 +234,7 @@ string reloadAuthAndForwards() for(SyncRes::domainmap_t::const_iterator i = t_sstorage->domainmap->begin(); i != t_sstorage->domainmap->end(); ++i) { for(SyncRes::AuthDomain::records_t::const_iterator j = i->second.d_records.begin(); j != i->second.d_records.end(); ++j) - broadcastFunction(boost::bind(pleaseWipeCache, j->qname)); + broadcastAccFunction(boost::bind(pleaseWipeCache, j->qname)); } string configname=::arg()["config-dir"]+"/recursor.conf"; @@ -259,7 +253,7 @@ string reloadAuthAndForwards() // purge again - new zones need to blank out the cache for(SyncRes::domainmap_t::const_iterator i = newDomainMap->begin(); i != newDomainMap->end(); ++i) { for(SyncRes::AuthDomain::records_t::const_iterator j = i->second.d_records.begin(); j != i->second.d_records.end(); ++j) - broadcastFunction(boost::bind(pleaseWipeCache, j->qname)); + broadcastAccFunction(boost::bind(pleaseWipeCache, j->qname)); } // this is pretty blunt diff --git a/pdns/syncres.hh b/pdns/syncres.hh index 0e26229b8..584d23748 100644 --- a/pdns/syncres.hh +++ b/pdns/syncres.hh @@ -550,5 +550,6 @@ uint64_t* pleaseGetConcurrentQueries(); uint64_t* pleaseGetThrottleSize(); uint64_t* pleaseGetPacketCacheHits(); uint64_t* pleaseGetPacketCacheSize(); +uint64_t* pleaseWipeCache(const std::string& canon); #endif -- 2.49.0