mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-21 01:54:34 +00:00
Flow dump rework fixes
This commit is contained in:
parent
18637f21e1
commit
19f17a3a4f
2 changed files with 5 additions and 3 deletions
|
|
@ -138,11 +138,11 @@ void GenericHash::purgeQueuedIdleEntries(bool (*walker)(GenericHashEntry *h, voi
|
|||
if(!cur_idle->empty()) {
|
||||
for(vector<GenericHashEntry*>::const_iterator it = cur_idle->begin(); it != cur_idle->end(); ++it) {
|
||||
walker(*it, user_data); /* In case of flow dump here the flow is queued for dump */
|
||||
entry_state_transition_counters.num_purged++;
|
||||
|
||||
/* In case of flow dump the uses number might be increased (0 -> 1) */
|
||||
if((*it)->getUses() == 0) {
|
||||
delete *it; /* Delete the entry */
|
||||
entry_state_transition_counters.num_purged++;
|
||||
/* https://www.techiedelight.com/remove-elements-vector-inside-loop-cpp/ */
|
||||
/* cur_idle->erase(it--); */
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue