From 5cdd9b460a49645b5a5015729b7decf709236974 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Fri, 2 May 2014 16:32:49 +0200 Subject: [PATCH] unix-socket: reset logging api's properly Lack of proper reset lead to logs not being written after the first pcap had been processed. --- src/runmodes.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/runmodes.c b/src/runmodes.c index 06eec0d459..bca4cc4039 100644 --- a/src/runmodes.c +++ b/src/runmodes.c @@ -424,6 +424,11 @@ void RunOutputFreeList(void) } } +static TmModule *pkt_logger_module = NULL; +static TmModule *tx_logger_module = NULL; +static TmModule *file_logger_module = NULL; +static TmModule *filedata_logger_module = NULL; + /** * Cleanup the run mode. */ @@ -444,13 +449,13 @@ void RunModeShutDown(void) SCFree(output); } + /* reset logger pointers */ + pkt_logger_module = NULL; + tx_logger_module = NULL; + file_logger_module = NULL; + filedata_logger_module = NULL; } -static TmModule *pkt_logger_module = NULL; -static TmModule *tx_logger_module = NULL; -static TmModule *file_logger_module = NULL; -static TmModule *filedata_logger_module = NULL; - /** \internal * \brief add Sub RunModeOutput to list for Submodule so we can free * the output ctx at shutdown and unix socket reload */