3
void IPStore::clearoldest() {
4
time_t oldest_time = time(0) + 100;
5
StoreMap::iterator oldest_entry;
13
for (StoreMap::iterator iter = store.begin();
16
if ((*iter).second.lastaccess < oldest_time) {
17
oldest_time = (*iter).second.lastaccess;
23
// Kill it if we got it.
26
Timestamp tm((*oldest_entry).second.lastaccess);
27
_debugmsg(Mstr("Erasing oldest IP store entry: ") +
28
Mstr(inet_ntoa(oldest_entry->first)) + " on " +
31
store.erase(oldest_entry);
34
Mutex::unlock(&store);