From c8d6dd0821fda2cbceae25abf9ee9c4db992b100 Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Fri, 21 Apr 2023 11:27:20 +0200 Subject: Improved debug output. * 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 --- example/ndpiReader.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'example/ndpiReader.c') 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 -- cgit v1.2.3