diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2022-11-06 13:18:44 +0100 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2022-11-06 13:19:29 +0100 |
commit | e629dd59cdb0c5114b77b5ee5047c664af2cb373 (patch) | |
tree | 32954eab8c329565e9304a55534fed462e3db785 /examples/c-captured/c-captured.c | |
parent | 7515c8aeec3f6e60aa7e97e6903f6306ca7af34e (diff) |
nDPIsrvd.h: Provide two additional convenient API functions.
* nDPIsrvd_json_buffer_string
* nDPIsrvd_json_buffer_length
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'examples/c-captured/c-captured.c')
-rw-r--r-- | examples/c-captured/c-captured.c | 3 |
1 files changed, 2 insertions, 1 deletions
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) { |