From 29c5cc39fb7f714897c3d6a3454e696e263fb9bc Mon Sep 17 00:00:00 2001 From: Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> Date: Wed, 25 Jan 2023 11:44:09 +0100 Subject: Some small changes (#1869) All dissector callbacks should not be exported by the library; make static some other local functions. The callback logic in `ndpiReader` has never been used. With internal libgcrypt, `gcry_control()` should always return no errors. We can check `categories` length at compilation time. --- example/ndpiReader.c | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'example/ndpiReader.c') diff --git a/example/ndpiReader.c b/example/ndpiReader.c index d98754db7..66706044a 100644 --- a/example/ndpiReader.c +++ b/example/ndpiReader.c @@ -2361,17 +2361,6 @@ static void node_idle_scan_walker(const void *node, ndpi_VISIT which, int depth, /* *********************************************** */ -/** - * @brief On Protocol Discover - demo callback - */ -static void on_protocol_discovered(struct ndpi_workflow * workflow, - struct ndpi_flow_info * flow, - void * udata) { - ; -} - -/* *********************************************** */ - #if 0 /** * @brief Print debug @@ -2430,11 +2419,6 @@ static void setupDetection(u_int16_t thread_id, pcap_t * pcap_handle) { ndpi_thread_info[thread_id].workflow = ndpi_workflow_init(&prefs, pcap_handle, 1, serialization_format); - /* Preferences */ - ndpi_workflow_set_flow_detected_callback(ndpi_thread_info[thread_id].workflow, - on_protocol_discovered, - (void *)(uintptr_t)thread_id); - /* Protocols to enable/disable. Default: everything is enabled */ NDPI_BITMASK_SET_ALL(enabled_bitmask); if(_disabled_protocols != NULL) { -- cgit v1.2.3