From e629dd59cdb0c5114b77b5ee5047c664af2cb373 Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Sun, 6 Nov 2022 13:18:44 +0100 Subject: nDPIsrvd.h: Provide two additional convenient API functions. * nDPIsrvd_json_buffer_string * nDPIsrvd_json_buffer_length Signed-off-by: Toni Uhlig --- examples/c-captured/c-captured.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'examples/c-captured/c-captured.c') diff --git a/examples/c-captured/c-captured.c b/examples/c-captured/c-captured.c index 5168c8191..e9fccba76 100644 --- a/examples/c-captured/c-captured.c +++ b/examples/c-captured/c-captured.c @@ -372,7 +372,8 @@ static enum nDPIsrvd_callback_return captured_json_callback(struct nDPIsrvd_sock if (pkt == NULL) { syslog(LOG_DAEMON | LOG_ERR, "%s", "No packet data available."); - return CALLBACK_ERROR; + syslog(LOG_DAEMON | LOG_ERR, "JSON String: \"%.*s\"", nDPIsrvd_json_buffer_length(sock), nDPIsrvd_json_buffer_string(sock)); + return CALLBACK_OK; } if (flow_user->packets == NULL) { -- cgit v1.2.3