From c95df281e39e4c946ac22001b22aee83e919a534 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Tue, 11 Feb 2014 07:44:42 +0100 Subject: [PATCH] eve-log: add warning if enabled but not supported If we're not compiled against libjansson, the eve-log output is not available. This patch adds a warning. --- src/runmodes.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/runmodes.c b/src/runmodes.c index 25a868ebe4..3aa87bdf02 100644 --- a/src/runmodes.c +++ b/src/runmodes.c @@ -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 }