aboutsummaryrefslogtreecommitdiff
path: root/example/ndpiReader.c
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2016-03-04 22:13:37 +0100
committerLuca Deri <deri@ntop.org>2016-03-04 22:13:37 +0100
commit7ea37edfbf2a603faedfb8c4e174446bbbd79d8c (patch)
treefb637709cd6d9f91f36aef3eacff0fa9b9389bd2 /example/ndpiReader.c
parent462368f959daf9ffc72fc0fd91ef62a03487354c (diff)
Improved protocol detection
Diffstat (limited to 'example/ndpiReader.c')
-rw-r--r--example/ndpiReader.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c
index 037b194d2..082871346 100644
--- a/example/ndpiReader.c
+++ b/example/ndpiReader.c
@@ -1086,7 +1086,10 @@ static unsigned int packet_processing(u_int16_t thread_id,
snprintf(flow->ssl.client_certificate, sizeof(flow->ssl.client_certificate), "%s", flow->ndpi_flow->protos.ssl.client_certificate);
snprintf(flow->ssl.server_certificate, sizeof(flow->ssl.server_certificate), "%s", flow->ndpi_flow->protos.ssl.server_certificate);
}
-
+
+ if(flow->detected_protocol.protocol == NDPI_PROTOCOL_UNKNOWN)
+ flow->detected_protocol = ndpi_detection_giveup(ndpi_thread_info[thread_id].ndpi_struct, flow->ndpi_flow);
+
free_ndpi_flow(flow);
if(verbose > 1) {