Reset do_reload_flows flag before dump flows. It allows to change
filter state more dynamically

Signed-off-by: Vadim Kochan <vadi...@gmail.com>
---
 flowtop.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/flowtop.c b/flowtop.c
index d90e1ee..1d438ba 100644
--- a/flowtop.c
+++ b/flowtop.c
@@ -1676,12 +1676,12 @@ static void *collector(void *null __maybe_unused)
                if (!do_reload_flows) {
                        usleep(USEC_PER_SEC * interval);
                } else {
+                       do_reload_flows = false;
+
                        flow_list_destroy(&flow_list);
 
                        collector_create_filter(ct_event);
                        collector_dump_flows();
-
-                       do_reload_flows = false;
                }
 
                collector_refresh_flows(ct_update);
-- 
2.6.3

-- 
You received this message because you are subscribed to the Google Groups 
"netsniff-ng" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to netsniff-ng+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to