From 6c3d162cd6d3f884b634397d63cea180b1e8f721 Mon Sep 17 00:00:00 2001 From: Toni Date: Tue, 9 Jan 2024 00:39:59 +0100 Subject: Add realtime protocol output to `ndpiReader`. (#2197) * support for using a new flow callback invoked before the flow memory is free'd * minor fixes Signed-off-by: Toni Uhlig --- example/reader_util.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'example/reader_util.c') diff --git a/example/reader_util.c b/example/reader_util.c index 28b208099..b69a11105 100644 --- a/example/reader_util.c +++ b/example/reader_util.c @@ -1425,6 +1425,9 @@ void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_fl flow->flow_payload = flow->ndpi_flow->flow_payload, flow->flow_payload_len = flow->ndpi_flow->flow_payload_len; flow->ndpi_flow->flow_payload = NULL; /* We'll free the memory */ + if(workflow->flow_callback != NULL) + workflow->flow_callback(workflow, flow, workflow->flow_callback_userdata); + ndpi_free_flow_info_half(flow); } } -- cgit v1.2.3