From: Victor Julien Date: Fri, 2 May 2014 14:32:49 +0000 (+0200) Subject: unix-socket: reset logging api's properly X-Git-Tag: suricata-2.0.1rc1~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F963%2Fhead;p=thirdparty%2Fsuricata.git unix-socket: reset logging api's properly Lack of proper reset lead to logs not being written after the first pcap had been processed. --- 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 */