filestore (old): register global stat in init func

This doesn't need to be registered from suricata.c. And moving
it to the init function makes sure its only registered if
the logger is actually enabled.
pull/3175/head
Jason Ish 8 years ago
parent 9b1d268071
commit cc35a5b81f

@ -670,18 +670,14 @@ static OutputInitResult LogFilestoreLogInitCtx(ConfNode *conf)
SCLogInfo("enabling pid as a part of all file names");
}
StatsRegisterGlobalCounter("file_store.open_files",
LogFilestoreOpenFilesCounter);
result.ctx = output_ctx;
result.ok = true;
SCReturnCT(result, "OutputInitResult");
}
void LogFilestoreInitConfig(void)
{
StatsRegisterGlobalCounter("file_store.open_files", LogFilestoreOpenFilesCounter);
}
void LogFilestoreRegister (void)
{
OutputRegisterFiledataModule(LOGGER_FILE_STORE, MODULE_NAME, "file",

@ -167,7 +167,6 @@
#include "host-storage.h"
#include "util-lua.h"
#include "log-filestore.h"
#ifdef HAVE_RUST
#include "rust.h"
@ -2206,7 +2205,6 @@ void PreRunInit(const int runmode)
DefragInit();
FlowInitConfig(FLOW_QUIET);
IPPairInitConfig(FLOW_QUIET);
LogFilestoreInitConfig();
StreamTcpInitConfig(STREAM_VERBOSE);
AppLayerParserPostStreamSetup();
AppLayerRegisterGlobalCounters();

Loading…
Cancel
Save