From 462368f959daf9ffc72fc0fd91ef62a03487354c Mon Sep 17 00:00:00 2001 From: Luca Deri Date: Fri, 4 Mar 2016 19:15:13 +0100 Subject: Added new ndpi_detection_giveup() API call to call before giving up for a given flow Code cleanup --- example/ndpiReader.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'example') diff --git a/example/ndpiReader.c b/example/ndpiReader.c index 76c0c30bf..037b194d2 100644 --- a/example/ndpiReader.c +++ b/example/ndpiReader.c @@ -653,6 +653,9 @@ static void node_proto_guess_walker(const void *node, ndpi_VISIT which, int dept u_int16_t thread_id = *((u_int16_t *) user_data); if((which == ndpi_preorder) || (which == ndpi_leaf)) { /* Avoid walking the same node multiple times */ + if((!flow->detection_completed) && flow->ndpi_flow) + flow->detected_protocol = ndpi_detection_giveup(ndpi_thread_info[0].ndpi_struct, flow->ndpi_flow); + if(enable_protocol_guess) { if(flow->detected_protocol.protocol == NDPI_PROTOCOL_UNKNOWN) { node_guess_undetected_protocol(thread_id, flow); -- cgit v1.2.3