Not used in output modules.
Ticket: #7227
return "error";
}
-static void FlowWorkerExitPrintStats(ThreadVars *tv, void *data)
-{
- FlowWorkerThreadData *fw = data;
- OutputLoggerExitPrintStats(tv, fw->output_thread);
-}
-
static bool FlowWorkerIsBusy(ThreadVars *tv, void *flow_worker)
{
FlowWorkerThreadData *fw = flow_worker;
tmm_modules[TMM_FLOWWORKER].Func = FlowWorker;
tmm_modules[TMM_FLOWWORKER].ThreadBusy = FlowWorkerIsBusy;
tmm_modules[TMM_FLOWWORKER].ThreadDeinit = FlowWorkerThreadDeinit;
- tmm_modules[TMM_FLOWWORKER].ThreadExitPrintStats = FlowWorkerExitPrintStats;
tmm_modules[TMM_FLOWWORKER].cap_flags = 0;
tmm_modules[TMM_FLOWWORKER].flags = TM_FLAG_STREAM_TM|TM_FLAG_DETECT_TM;
}
void OutputPacketLoggerRegister(void)
{
- OutputRegisterRootLogger(OutputPacketLogThreadInit, OutputPacketLogThreadDeinit, NULL,
+ OutputRegisterRootLogger(OutputPacketLogThreadInit, OutputPacketLogThreadDeinit,
OutputPacketLog, OutputPacketLoggerGetActiveCount);
}
}
void OutputStreamingLoggerRegister(void) {
- OutputRegisterRootLogger(OutputStreamingLogThreadInit, OutputStreamingLogThreadDeinit, NULL,
+ OutputRegisterRootLogger(OutputStreamingLogThreadInit, OutputStreamingLogThreadDeinit,
OutputStreamingLog, OutputStreamingLoggerGetActiveCount);
}
if (unlikely(list == NULL)) {
FatalError("Failed to allocate OutputTx list");
}
- OutputRegisterRootLogger(OutputTxLogThreadInit, OutputTxLogThreadDeinit, NULL, OutputTxLog,
+ OutputRegisterRootLogger(OutputTxLogThreadInit, OutputTxLogThreadDeinit, OutputTxLog,
OutputTxLoggerGetActiveCount);
}
OutputLogFunc LogFunc;
ThreadInitFunc ThreadInit;
ThreadDeinitFunc ThreadDeinit;
- ThreadExitPrintStatsFunc ThreadExitPrintStats;
OutputGetActiveCountFunc ActiveCntFunc;
TAILQ_ENTRY(RootLogger_) entries;
return TM_ECODE_OK;
}
-void OutputLoggerExitPrintStats(ThreadVars *tv, void *thread_data)
-{
- LoggerThreadStore *thread_store = (LoggerThreadStore *)thread_data;
- RootLogger *logger = TAILQ_FIRST(&active_loggers);
- LoggerThreadStoreNode *thread_store_node = TAILQ_FIRST(thread_store);
- while (logger && thread_store_node) {
- if (logger->ThreadExitPrintStats != NULL) {
- logger->ThreadExitPrintStats(tv, thread_store_node->thread_data);
- }
- logger = TAILQ_NEXT(logger, entries);
- thread_store_node = TAILQ_NEXT(thread_store_node, entries);
- }
-}
-
-void OutputRegisterRootLogger(ThreadInitFunc ThreadInit,
- ThreadDeinitFunc ThreadDeinit,
- ThreadExitPrintStatsFunc ThreadExitPrintStats,
- OutputLogFunc LogFunc, OutputGetActiveCountFunc ActiveCntFunc)
+void OutputRegisterRootLogger(ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit,
+ OutputLogFunc LogFunc, OutputGetActiveCountFunc ActiveCntFunc)
{
BUG_ON(LogFunc == NULL);
}
logger->ThreadInit = ThreadInit;
logger->ThreadDeinit = ThreadDeinit;
- logger->ThreadExitPrintStats = ThreadExitPrintStats;
logger->LogFunc = LogFunc;
logger->ActiveCntFunc = ActiveCntFunc;
TAILQ_INSERT_TAIL(®istered_loggers, logger, entries);
}
logger->ThreadInit = reg->ThreadInit;
logger->ThreadDeinit = reg->ThreadDeinit;
- logger->ThreadExitPrintStats = reg->ThreadExitPrintStats;
logger->LogFunc = reg->LogFunc;
logger->ActiveCntFunc = reg->ActiveCntFunc;
TAILQ_INSERT_TAIL(&active_loggers, logger, entries);
ThreadInitFunc ThreadInit;
ThreadDeinitFunc ThreadDeinit;
- ThreadExitPrintStatsFunc ThreadExitPrintStats;
PacketLogger PacketLogFunc;
PacketLogCondition PacketConditionFunc;
void OutputUnregisterFileRotationFlag(int *flag);
void OutputNotifyFileRotation(void);
-void OutputRegisterRootLogger(ThreadInitFunc ThreadInit,
- ThreadDeinitFunc ThreadDeinit,
- ThreadExitPrintStatsFunc ThreadExitPrintStats,
- OutputLogFunc LogFunc, OutputGetActiveCountFunc ActiveCntFunc);
+void OutputRegisterRootLogger(ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit,
+ OutputLogFunc LogFunc, OutputGetActiveCountFunc ActiveCntFunc);
void TmModuleLoggerRegister(void);
TmEcode OutputLoggerLog(ThreadVars *, Packet *, void *);