void aggr_source_discovery::run_gc(cache &c) { time_t now = time(0); cache::iterator i = c.begin(); while (i != c.end()) { cache::iterator j = i; ++i; if ((now - j->second) > m_keepalive) { if (g_mrd->should_log(INTERNAL_FLOW)) { g_mrd->log().xprintf("AggrSourceDiscovery " "cleaned source (%{Addr}, %{Addr}).\n", j->first.second, j->first.first); } c.erase(j); } } }