aboutsummaryrefslogtreecommitdiff
path: root/example/reader_util.c
diff options
context:
space:
mode:
authorToni <matzeton@googlemail.com>2024-01-09 00:39:59 +0100
committerGitHub <noreply@github.com>2024-01-09 00:39:59 +0100
commit6c3d162cd6d3f884b634397d63cea180b1e8f721 (patch)
tree604db58c872b736b97402ac1ef29891e83c2d96f /example/reader_util.c
parent90b999e3f1a67babbcd7003fb0ccab005d45f343 (diff)
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 <matzeton@googlemail.com>
Diffstat (limited to 'example/reader_util.c')
-rw-r--r--example/reader_util.c3
1 files changed, 3 insertions, 0 deletions
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);
}
}