aboutsummaryrefslogtreecommitdiff
path: root/src/lib/protocols/s7comm.c
diff options
context:
space:
mode:
authorNardi Ivan <nardi.ivan@gmail.com>2020-06-14 14:42:39 +0200
committerNardi Ivan <nardi.ivan@gmail.com>2020-06-26 12:04:02 +0200
commit56d87186f7e6d7dba042961be86d1b4b5ae9f2e3 (patch)
treec12eead682a860ff118c08296bd03361143eca34 /src/lib/protocols/s7comm.c
parentebfb5e7f01e4c0ab6bd8eb411165cb002443b891 (diff)
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
Diffstat (limited to 'src/lib/protocols/s7comm.c')
-rw-r--r--src/lib/protocols/s7comm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/protocols/s7comm.c b/src/lib/protocols/s7comm.c
index 7d2b92642..ec32c106e 100644
--- a/src/lib/protocols/s7comm.c
+++ b/src/lib/protocols/s7comm.c
@@ -21,8 +21,8 @@
*
*/
#include "ndpi_protocol_ids.h"
-#include "ndpi_api.h"
#define NDPI_CURRENT_PROTO NDPI_PROTOCOL_S7COMM
+#include "ndpi_api.h"
void ndpi_search_s7comm_tcp(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow) {