]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
unix-socket: reset logging api's properly 963/head
authorVictor Julien <victor@inliniac.net>
Fri, 2 May 2014 14:32:49 +0000 (16:32 +0200)
committerVictor Julien <victor@inliniac.net>
Fri, 2 May 2014 14:32:49 +0000 (16:32 +0200)
Lack of proper reset lead to logs not being written after the first
pcap had been processed.

src/runmodes.c

index 06eec0d459ff08126e3bf5eed5378316f26b6be5..bca4cc4039a62e7c012cda18084080431dfff256 100644 (file)
@@ -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 */