diff options
author | Toni <matzeton@googlemail.com> | 2023-04-21 12:40:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-21 12:40:26 +0200 |
commit | b6629ba2befccec6356802fabf2d7a076133d900 (patch) | |
tree | d20488f45df942b59b3843350c213e2257be612c /example/ndpiReader.c | |
parent | 85751ba9d7a67dfcb371d71803432918d70e2f3c (diff) |
Improved debug output. (#1951)
* 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 |