Skip to content

Commit

Permalink
fixed segfault when using flow cache stats plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
havraji6 committed Jun 21, 2021
1 parent 3d4db91 commit 91268d3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -929,10 +929,6 @@ int main(int argc, char *argv[])
options.snaplen = MAXPCKTSIZE;
}

if (!options.print_stats) {
plugin_wrapper.plugins.push_back(new StatsPlugin(options.cache_stats_interval, cout));
}

FlowExporter *exporter;
if (export_unirec) {
#ifdef WITH_NEMEA
Expand Down Expand Up @@ -963,6 +959,10 @@ int main(int argc, char *argv[])
return error("Unable to initialize ring buffer.");
}

if (!options.print_stats) {
plugin_wrapper.plugins.push_back(new StatsPlugin(options.cache_stats_interval, cout));
}

std::vector<WorkPipeline> pipelines;
std::vector<ExporterWorker> exporters;
std::vector<std::future<InputStats>> inputFutures;
Expand Down

0 comments on commit 91268d3

Please sign in to comment.