Call clean on all networks periodically, generalize Topology clean cycle to an overall clean cycle.

This commit is contained in:
Adam Ierymenko
2013-07-30 11:14:53 -04:00
parent e4c5ad9f43
commit 7e156b2622
6 changed files with 40 additions and 9 deletions

View File

@ -72,6 +72,13 @@ void NodeConfig::whackAllTaps()
n->second->tap().whack();
}
void NodeConfig::cleanAllNetworks()
{
Mutex::Lock _l(_networks_m);
for(std::map< uint64_t,SharedPtr<Network> >::const_iterator n(_networks.begin());n!=_networks.end();++n)
n->second->clean();
}
// Macro used in execute()
#undef _P
#define _P(f,...) { r.push_back(std::string()); Utils::stdsprintf(r.back(),(f),##__VA_ARGS__); }