From 9cf016c5f1f6141c9ae798bba8d5ab2930e417b9 Mon Sep 17 00:00:00 2001 From: emanuele-f Date: Wed, 25 Mar 2020 14:00:47 +0100 Subject: Fix ndpi_get_api_version version truncation --- src/include/ndpi_api.h.in | 2 +- src/lib/ndpi_main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/include/ndpi_api.h.in b/src/include/ndpi_api.h.in index fb409c0eb..75a1bb5e2 100644 --- a/src/include/ndpi_api.h.in +++ b/src/include/ndpi_api.h.in @@ -852,7 +852,7 @@ extern "C" { //void * ndpi_malloc(size_t size); //void * ndpi_calloc(unsigned long count, size_t size); //void ndpi_free(void *ptr); - u_int8_t ndpi_get_api_version(void); + int ndpi_get_api_version(void); /* https://github.com/corelight/community-id-spec */ int ndpi_flowv4_flow_hash(u_int8_t l4_proto, u_int32_t src_ip, u_int32_t dst_ip, u_int16_t src_port, u_int16_t dst_port, diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index 21491c5e7..8ab7ad520 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -6535,7 +6535,7 @@ void NDPI_DUMP_BITMASK(NDPI_PROTOCOL_BITMASK a) { } #endif -u_int8_t ndpi_get_api_version() { +int ndpi_get_api_version() { return(NDPI_API_VERSION); } -- cgit v1.2.3