Refactoring fixes

This commit is contained in:
Luca 2019-10-11 07:36:06 +02:00
parent 9870eee2e7
commit 263fe3927b
5 changed files with 14 additions and 7 deletions

View file

@ -248,7 +248,7 @@ u_int GenericHash::purgeIdle(bool force_idle) {
} else {
switch(head_state) {
case hash_entry_state_allocated:
ntop->getTrace()->traceEvent(TRACE_WARNING, "Unexpected state (%u)", head_state);
/* TCP flows with 3WH not yet completed fall here */
break;
case hash_entry_state_flow_notyetdetected:
@ -262,7 +262,7 @@ u_int GenericHash::purgeIdle(bool force_idle) {
break;
case hash_entry_state_active:
if(head->is_hash_entry_state_idle_transition_ready() || force_idle)
if(force_idle || head->is_hash_entry_state_idle_transition_ready())
head->set_hash_entry_state_idle();
break;
}