mirror of
https://github.com/optim-enterprises-bv/nDPId.git
synced 2025-10-29 09:22:23 +00:00
Fixed missing deflate during flow event json serializing.
* caused by recently added serializing some nDPI data even packet processing is still ongoing Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
This commit is contained in:
@@ -213,6 +213,9 @@ set(NDPID_DEPS_INC "${CMAKE_SOURCE_DIR}"
|
||||
"${CMAKE_SOURCE_DIR}/dependencies"
|
||||
"${CMAKE_SOURCE_DIR}/dependencies/jsmn"
|
||||
"${CMAKE_SOURCE_DIR}/dependencies/uthash/src")
|
||||
if(CMAKE_CROSSCOMPILING)
|
||||
add_definitions("-DCROSS_COMPILATION=1")
|
||||
endif()
|
||||
if(ENABLE_MEMORY_PROFILING)
|
||||
message(WARNING "ENABLE_MEMORY_PROFILING should not be used in production environments.")
|
||||
add_definitions("-DENABLE_MEMORY_PROFILING=1"
|
||||
|
||||
16
nDPId.c
16
nDPId.c
@@ -2744,7 +2744,21 @@ static void jsonize_flow_event(struct nDPId_reader_thread * const reader_thread,
|
||||
}
|
||||
else if (flow_ext->flow_basic.state == FS_INFO)
|
||||
{
|
||||
struct nDPId_flow const * const flow = (struct nDPId_flow *)flow_ext;
|
||||
struct nDPId_flow * const flow = (struct nDPId_flow *)flow_ext;
|
||||
|
||||
#ifdef ENABLE_ZLIB
|
||||
if (nDPId_options.enable_zlib_compression != 0 && flow->info.detection_data_compressed_size > 0)
|
||||
{
|
||||
workflow->current_compression_diff -= flow->info.detection_data_compressed_size;
|
||||
int ret = detection_data_inflate(flow);
|
||||
if (ret <= 0)
|
||||
{
|
||||
workflow->current_compression_diff += flow->info.detection_data_compressed_size;
|
||||
logger(1, "zLib decompression failed with error code: %d", ret);
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (flow->info.detection_completed != 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user