runmodes: config test is offline

pull/3022/head
Victor Julien 7 years ago
parent 71c3141ec6
commit 93b120e70d

@ -487,6 +487,7 @@ int RunModeOutputFiledataEnabled(void)
bool IsRunModeOffline(int run_mode_to_check)
{
switch(run_mode_to_check) {
case RUNMODE_CONF_TEST:
case RUNMODE_PCAP_FILE:
case RUNMODE_ERF_FILE:
case RUNMODE_ENGINE_ANALYSIS:

@ -25,6 +25,7 @@
#include "suricata-common.h"
#include "config.h"
#include "conf.h"
#include "runmodes.h"
#include "util-conf.h"
TmEcode ConfigSetLogDirectory(char *name)
@ -105,7 +106,7 @@ int ConfUnixSocketIsEnable(void)
#ifdef OS_WIN32
return 0;
#else
if (TimeModeIsLive()) {
if (!IsRunModeOffline(RunmodeGetCurrent())) {
SCLogInfo("Running in live mode, activating unix socket");
return 1;
} else {

Loading…
Cancel
Save