filestore: only allow one filestore to be enabled

There is probably not too much bad about enabling both, but
open file counts can get messy with both enabled. And v1
should be schedule for deprecation soon enough.
pull/3175/head
Jason Ish 9 years ago
parent cc35a5b81f
commit aa0760a8d5

@ -584,6 +584,13 @@ static OutputInitResult LogFilestoreLogInitCtx(ConfNode *conf)
}
}
if (RunModeOutputFiledataEnabled()) {
SCLogWarning(SC_ERR_NOT_SUPPORTED,
"A file data logger is already enabled. Filestore (v1) "
"will not be enabled.");
return result;
}
OutputCtx *output_ctx = SCCalloc(1, sizeof(OutputCtx));
if (unlikely(output_ctx == NULL))
return result;

@ -387,6 +387,13 @@ static OutputInitResult OutputFilestoreLogInitCtx(ConfNode *conf)
return result;
}
if (RunModeOutputFiledataEnabled()) {
SCLogWarning(SC_ERR_NOT_SUPPORTED,
"A file data logger is already enabled. Filestore (v2) "
"will not be enabled.");
return result;
}
char log_directory[PATH_MAX] = "";
GetLogDirectory(conf, log_directory, sizeof(log_directory));
if (!InitFilestoreDirectory(log_directory)) {

Loading…
Cancel
Save