aboutsummaryrefslogtreecommitdiff
path: root/example/reader_util.c
diff options
context:
space:
mode:
authorNardi Ivan <nardi.ivan@gmail.com>2024-01-10 11:19:44 +0100
committerIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2024-01-18 10:21:24 +0100
commit6c85f10cd5a29346522ad647a38066f0cc44e5a7 (patch)
tree062db3a48785916f4532ca712ad0ea41698f952c /example/reader_util.c
parentc704be1a20d169bea1c55a720421742f09f4aa88 (diff)
config: move debug/log configuration to the new API
Diffstat (limited to 'example/reader_util.c')
-rw-r--r--example/reader_util.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/example/reader_util.c b/example/reader_util.c
index e5399ab16..9f8a76c1c 100644
--- a/example/reader_util.c
+++ b/example/reader_util.c
@@ -448,15 +448,11 @@ int parse_proto_name_list(char *str, NDPI_PROTOCOL_BITMASK *bitmask, int inverte
/* ***************************************************** */
-extern char *_debug_protocols;
-
struct ndpi_workflow* ndpi_workflow_init(const struct ndpi_workflow_prefs * prefs,
pcap_t * pcap_handle, int do_init_flows_root,
ndpi_serialization_format serialization_format) {
struct ndpi_detection_module_struct * module;
struct ndpi_workflow * workflow;
- static NDPI_PROTOCOL_BITMASK debug_bitmask;
- static int _debug_protocols_ok = 0;
/* On some fuzzers we don't want to use these memory allocators, but some custom ones */
#ifndef DISABLE_CUSTOM_ALLOCATOR_ON_READERUTILS
@@ -485,20 +481,6 @@ struct ndpi_workflow* ndpi_workflow_init(const struct ndpi_workflow_prefs * pref
ndpi_set_user_data(module, workflow);
- ndpi_set_log_level(module, nDPI_LogLevel);
-
- if(_debug_protocols != NULL && ! _debug_protocols_ok) {
- NDPI_BITMASK_RESET(debug_bitmask);
- if(parse_proto_name_list(_debug_protocols, &debug_bitmask, 0)) {
- ndpi_exit_detection_module(module);
- ndpi_free(workflow);
- return NULL;
- }
- _debug_protocols_ok = 1;
- }
- if(_debug_protocols_ok)
- ndpi_set_debug_bitmask(module, debug_bitmask);
-
if(do_init_flows_root) {
workflow->ndpi_flows_root = ndpi_calloc(workflow->prefs.num_roots, sizeof(void *));
if(!workflow->ndpi_flows_root) {