summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVadim Kochan <vadim4j@gmail.com>2015-12-16 22:12:09 +0200
committerTobias Klauser <tklauser@distanz.ch>2015-12-21 14:31:37 +0100
commit9dc85a7180864a2e1ac8eb712aee144e834008de (patch)
tree38e13c5aac915d6b75b6b700b28c297fdac06125
parent2f928fcfcb0965419cff3f6ff89757d2f0512c88 (diff)
flowtop: Refresh flows if filter was changed while flows loading
Reset do_reload_flows flag before dump flows. It allows to change filter state more dynamically Signed-off-by: Vadim Kochan <vadim4j@gmail.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
-rw-r--r--flowtop.c4
1 files 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);