Fix compilation with --enable-debug-messages flag

NDPI_LOG* macros dereference ndpi_detection_module_struct object which is
private to ndpi library (via NDPI_LIB_COMPILATION define). So we can't use
them outside the library itself, i.e. in ndpiReader code
Therefore, in files in example/, convert all (rare) uses of NDPI_LOG* macros
to a new very simple macro, private to ndpiReader program. If necessary,
such macro may be improved.

According to a comment in ndpi_define.h, each dissector must define its own
NDPI_CURRENT_PROTO macro before including ndpi_api.h file
This commit is contained in:
Nardi Ivan
2020-06-26 12:04:02 +02:00
parent ebfb5e7f01
commit 56d87186f7
13 changed files with 46 additions and 31 deletions
+1 -1
View File
@@ -21,7 +21,7 @@
*
*/
#include "ndpi_protocol_ids.h"
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_MINING
#include "ndpi_api.h"
/* ************************************************************************** */