]> granicus.if.org Git - pdns/commitdiff
remove duplicate 'pleaseWipeCache' code
authorBert Hubert <bert.hubert@netherlabs.nl>
Sun, 8 Aug 2010 17:37:33 +0000 (17:37 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Sun, 8 Aug 2010 17:37:33 +0000 (17:37 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1683 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/rec_channel_rec.cc
pdns/reczones.cc
pdns/syncres.hh

index 0ff62a2305bf22319f240a996417d32f6c35adee..aa579cc51e3510d949510288f9b353e285240db7 100644 (file)
@@ -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));
 }
index 0f1a75189a59233f17da3b6a353d5ad8e0f3ce5a..549bef43d7c8954e7446d5a759cc7b1c0773319e 100644 (file)
@@ -213,12 +213,6 @@ void convertServersForAD(const std::string& input, SyncRes::AuthDomain& ad, cons
     L<<endl;
 }
 
-void* pleaseWipeCache(const std::string& qname)
-{
-  t_RC->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<uint64_t>(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<uint64_t>(boost::bind(pleaseWipeCache, j->qname));
     }
 
     // this is pretty blunt
index 0e26229b82fb5f22bb4b2bea74ac6f4d724b0766..584d23748740e249a02dfcc9592596625be61203 100644 (file)
@@ -550,5 +550,6 @@ uint64_t* pleaseGetConcurrentQueries();
 uint64_t* pleaseGetThrottleSize();
 uint64_t* pleaseGetPacketCacheHits();
 uint64_t* pleaseGetPacketCacheSize();
+uint64_t* pleaseWipeCache(const std::string& canon);
 
 #endif