From fcbc16da002d6c08ecbff6567b6e8462238358d1 Mon Sep 17 00:00:00 2001 From: Luca Deri Date: Tue, 30 Mar 2021 17:49:48 +0200 Subject: Fixed invalid guess stats --- example/ndpiReader.c | 2 ++ example/reader_util.c | 1 + 2 files changed, 3 insertions(+) (limited to 'example') diff --git a/example/ndpiReader.c b/example/ndpiReader.c index 8854a7d23..9d0bbe8a2 100644 --- a/example/ndpiReader.c +++ b/example/ndpiReader.c @@ -1542,6 +1542,8 @@ static void node_proto_guess_walker(const void *node, ndpi_VISIT which, int dept flow->detected_protocol = ndpi_detection_giveup(ndpi_thread_info[0].workflow->ndpi_struct, flow->ndpi_flow, enable_protocol_guess, &proto_guessed); + + if(enable_protocol_guess) ndpi_thread_info[thread_id].workflow->stats.guessed_flow_protocols++; } process_ndpi_collected_info(ndpi_thread_info[thread_id].workflow, flow, csv_fp); diff --git a/example/reader_util.c b/example/reader_util.c index 222a5f3bb..881d21697 100644 --- a/example/reader_util.c +++ b/example/reader_util.c @@ -1531,6 +1531,7 @@ static struct ndpi_proto packet_processing(struct ndpi_workflow * workflow, flow->detected_protocol = ndpi_detection_giveup(workflow->ndpi_struct, flow->ndpi_flow, enable_protocol_guess, &proto_guessed); + if(enable_protocol_guess) workflow->stats.guessed_flow_protocols++; } process_ndpi_collected_info(workflow, flow, csv_fp); -- cgit v1.2.3