Removes useless disablePurge and enablePurge

This commit is contained in:
Simone Mainardi 2019-07-05 16:08:51 +02:00
parent ef4f98a5a5
commit 94f894454c
4 changed files with 2 additions and 162 deletions

View file

@ -181,8 +181,7 @@ u_int GenericHash::purgeIdle() {
u_int i, num_purged = 0, buckets_checked = 0;
time_t now = time(NULL);
if(ntop->getGlobals()->isShutdown()
|| purgeLock.is_locked())
if(ntop->getGlobals()->isShutdown())
return(0);
#if WALK_DEBUG
@ -190,8 +189,6 @@ u_int GenericHash::purgeIdle() {
name, iface->get_name(), last_purged_hash, purge_step);
#endif
disablePurge();
for(u_int j = 0; j < purge_step; j++) {
if(++last_purged_hash == num_hashes) last_purged_hash = 0;
i = last_purged_hash;
@ -235,8 +232,6 @@ u_int GenericHash::purgeIdle() {
}
}
enablePurge();
#if WALK_DEBUG
if(/* (num_purged > 0) && */ (!strcmp(name, "FlowHash")))
ntop->getTrace()->traceEvent(TRACE_NORMAL,