]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
eve-log: add warning if enabled but not supported
authorVictor Julien <victor@inliniac.net>
Tue, 11 Feb 2014 06:44:42 +0000 (07:44 +0100)
committerVictor Julien <victor@inliniac.net>
Tue, 11 Feb 2014 07:54:36 +0000 (08:54 +0100)
If we're not compiled against libjansson, the eve-log output is not
available. This patch adds a warning.

src/runmodes.c

index 25a868ebe4472037762ab3214c0f159d26d79125..3aa87bdf02f41e63886419377e2b7ac20fad3a27 100644 (file)
@@ -558,7 +558,7 @@ void RunModeInitializeOutputs(void)
         }
 
         if (strncmp(output->val, "unified-", sizeof("unified-") - 1) == 0) {
-            SCLogWarning(SC_ERR_INVALID_ARGUMENT,
+            SCLogWarning(SC_ERR_NOT_SUPPORTED,
                     "Unified1 is no longer supported,"
                     " use Unified2 instead "
                     "(see https://redmine.openinfosecfoundation.org/issues/353"
@@ -566,11 +566,19 @@ void RunModeInitializeOutputs(void)
             continue;
         } else if (strcmp(output->val, "alert-prelude") == 0) {
 #ifndef PRELUDE
-            SCLogWarning(SC_ERR_INVALID_ARGUMENT,
+            SCLogWarning(SC_ERR_NOT_SUPPORTED,
                     "Prelude support not compiled in. Reconfigure/"
                     "recompile with --enable-prelude to add Prelude "
                     "support.");
             continue;
+#endif
+        } else if (strcmp(output->val, "eve-log") == 0) {
+#ifndef HAVE_LIBJANSSON
+            SCLogWarning(SC_ERR_NOT_SUPPORTED,
+                    "Eve-log support not compiled in. Reconfigure/"
+                    "recompile with libjansson and its development "
+                    "files installed to add eve-log support.");
+            continue;
 #endif
         }