aboutsummaryrefslogtreecommitdiff
path: root/example/ndpiReader.c
diff options
context:
space:
mode:
Diffstat (limited to 'example/ndpiReader.c')
-rw-r--r--example/ndpiReader.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c
index 1f09e610e..91eca9bd2 100644
--- a/example/ndpiReader.c
+++ b/example/ndpiReader.c
@@ -95,7 +95,8 @@ static struct ndpi_detection_module_struct *ndpi_info_mod = NULL;
extern u_int32_t max_num_packets_per_flow, max_packet_payload_dissection, max_num_reported_top_payloads;
extern u_int16_t min_pattern_len, max_pattern_len;
-
+extern void ndpi_self_check_host_match(); /* Self check function */
+
struct flow_info {
struct ndpi_flow_info *flow;
u_int16_t thread_id;
@@ -1116,7 +1117,8 @@ static void printFlow(u_int16_t id, struct ndpi_flow_info *flow, u_int16_t threa
flowGetBDMeanandVariance(flow);
}
- fprintf(csv_fp, "\n");
+ if(csv_fp)
+ fprintf(csv_fp, "\n");
return;
}
@@ -1751,6 +1753,7 @@ static void node_idle_scan_walker(const void *node, ndpi_VISIT which, int depth,
ndpi_free_flow_info_half(flow);
ndpi_free_flow_data_analysis(flow);
+ ndpi_free_flow_tls_data(flow);
ndpi_thread_info[thread_id].workflow->stats.ndpi_flow_count--;
/* adding to a queue (we can't delete it from the tree inline ) */
@@ -3242,6 +3245,7 @@ int orginal_main(int argc, char **argv) {
automataUnitTest();
serializerUnitTest();
analyzeUnitTest();
+ ndpi_self_check_host_match();
gettimeofday(&startup_time, NULL);
ndpi_info_mod = ndpi_init_detection_module(ndpi_no_prefs);