diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2020-11-19 19:34:11 +0100 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2020-12-01 10:22:47 +0100 |
commit | f8692c6be11c664e4345ceaaec5c6b35ba9b3feb (patch) | |
tree | 5f19272d7bef0f3f0413e973f988ba44c91e87d5 /examples/c-json-stdout | |
parent | a9b87e573964603e3932b4995b6045ed2f91bdc5 (diff) |
Let travis use pcap files from nDPI to produce some JSON output. (disabled, needs further testing..)
* Added pcap diff script
* Added \n to JSON string end (useful for debugging and readability)
* Use first host/server name character for hash calculation as well
* Removed error'ing EPOLLHUP handling in nDPIsrvd (connection closing will be detected via read())
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'examples/c-json-stdout')
-rw-r--r-- | examples/c-json-stdout/c-json-stdout.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/c-json-stdout/c-json-stdout.c b/examples/c-json-stdout/c-json-stdout.c index b70d7bac5..015bc99fe 100644 --- a/examples/c-json-stdout/c-json-stdout.c +++ b/examples/c-json-stdout/c-json-stdout.c @@ -90,7 +90,8 @@ int main(void) break; } - if (buf[json_bytes - 1] != '}') + if (buf[json_bytes - 2] != '}' || + buf[json_bytes - 1] != '\n') { fprintf(stderr, "BUG: Invalid JSON string: %.*s\n", (int)json_bytes, buf); exit(1); |