]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
flow: don't BUG_ON if no loggers are enabled
authorVictor Julien <victor@inliniac.net>
Tue, 6 May 2014 18:48:47 +0000 (20:48 +0200)
committerVictor Julien <victor@inliniac.net>
Mon, 28 Jul 2014 13:47:44 +0000 (15:47 +0200)
API is always called, even if no loggers are enabled. Don't abort()
in this case.

src/output-flow.c

index 826369fcc6b263bf5247206f50e7081057b684a7..9364ca5e02e4fde22a582c704560f5c5d3210931 100644 (file)
@@ -86,7 +86,10 @@ int OutputRegisterFlowLogger(const char *name, FlowLogger LogFunc, OutputCtx *ou
  */
 TmEcode OutputFlowLog(ThreadVars *tv, void *thread_data, Flow *f) {
     BUG_ON(thread_data == NULL);
-    BUG_ON(list == NULL);
+
+    if (list == NULL)
+        return TM_ECODE_OK;
+    //BUG_ON(list == NULL);
 
     OutputLoggerThreadData *op_thread_data = (OutputLoggerThreadData *)thread_data;
     OutputFlowLogger *logger = list;