diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2023-04-21 11:27:20 +0200 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2023-04-21 11:28:03 +0200 |
commit | c8d6dd0821fda2cbceae25abf9ee9c4db992b100 (patch) | |
tree | 019ebf2de80e57793df92a3da7d93ea18def7d32 /example/ndpiReader.c | |
parent | ba993300311158c79c4880a621e43684d4b4a03d (diff) |
Improved debug output.improved/debug-out
* try to get rid of some `printf(..)`s as they do not belong to a shared library
* replaced all `exit(..)`s with `abort()`s to indicate an abnormal process termination
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'example/ndpiReader.c')
-rw-r--r-- | example/ndpiReader.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c index 05f362ce9..72408409e 100644 --- a/example/ndpiReader.c +++ b/example/ndpiReader.c @@ -126,7 +126,6 @@ static struct ndpi_detection_module_struct *ndpi_info_mod = NULL; extern u_int8_t enable_doh_dot_detection; extern u_int32_t max_num_packets_per_flow, max_packet_payload_dissection, max_num_reported_top_payloads; extern u_int16_t min_pattern_len, max_pattern_len; -extern void ndpi_self_check_host_match(); /* Self check function */ u_int8_t dump_internal_stats; struct ndpi_bin malloc_bins; @@ -827,7 +826,7 @@ static void parseOptions(int argc, char **argv) { switch (opt) { case 'a': ndpi_generate_options(atoi(optarg)); - break; + exit(0); case 'A': dump_internal_stats = 1; @@ -5198,7 +5197,7 @@ int main(int argc, char **argv) { bitmapUnitTest(); automataUnitTest(); analyzeUnitTest(); - ndpi_self_check_host_match(); + ndpi_self_check_host_match(stderr); analysisUnitTest(); compressedBitmapUnitTest(); #endif |