]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
logging: remove unused print stats callbacks 2592/head 2605/head 2606/head
authorJason Ish <ish@unx.ca>
Mon, 20 Feb 2017 18:00:15 +0000 (12:00 -0600)
committerVictor Julien <victor@inliniac.net>
Tue, 21 Feb 2017 08:59:35 +0000 (09:59 +0100)
Remove the ThreadExitPrintStats callback from logging modules
that weren't doing anything with it.

src/alert-debuglog.c
src/alert-fastlog.c
src/alert-syslog.c
src/log-httplog.c
src/log-stats.c
src/log-tcp-data.c

index 6c56f69973c6e37e40c2ecad17f561589e1777b9..74ff0112803f16b24bdcbd897de56f285a583841 100644 (file)
@@ -412,14 +412,6 @@ static TmEcode AlertDebugLogThreadDeinit(ThreadVars *t, void *data)
     return TM_ECODE_OK;
 }
 
-static void AlertDebugLogExitPrintStats(ThreadVars *tv, void *data)
-{
-    AlertDebugLogThread *aft = (AlertDebugLogThread *)data;
-    if (aft == NULL) {
-        return;
-    }
-}
-
 static void AlertDebugLogDeInitCtx(OutputCtx *output_ctx)
 {
     if (output_ctx != NULL) {
@@ -490,6 +482,5 @@ void AlertDebugLogRegister(void)
 {
     OutputRegisterPacketModule(LOGGER_ALERT_DEBUG, MODULE_NAME, "alert-debug",
         AlertDebugLogInitCtx, AlertDebugLogLogger, AlertDebugLogCondition,
-        AlertDebugLogThreadInit, AlertDebugLogThreadDeinit,
-        AlertDebugLogExitPrintStats);
+        AlertDebugLogThreadInit, AlertDebugLogThreadDeinit, NULL);
 }
index d3f2455085357fb47d9a21f6409843c2f111ad6a..d475a6a38c3adfdcca0b4228bf33c3d4f7508eb6 100644 (file)
@@ -69,7 +69,6 @@
 
 TmEcode AlertFastLogThreadInit(ThreadVars *, void *, void **);
 TmEcode AlertFastLogThreadDeinit(ThreadVars *, void *);
-void AlertFastLogExitPrintStats(ThreadVars *, void *);
 void AlertFastLogRegisterTests(void);
 static void AlertFastLogDeInitCtx(OutputCtx *);
 
@@ -80,8 +79,7 @@ void AlertFastLogRegister(void)
 {
     OutputRegisterPacketModule(LOGGER_ALERT_FAST, MODULE_NAME, "fast",
         AlertFastLogInitCtx, AlertFastLogger, AlertFastLogCondition,
-        AlertFastLogThreadInit, AlertFastLogThreadDeinit,
-        AlertFastLogExitPrintStats);
+        AlertFastLogThreadInit, AlertFastLogThreadDeinit, NULL);
     AlertFastLogRegisterTests();
 }
 
@@ -217,16 +215,6 @@ TmEcode AlertFastLogThreadDeinit(ThreadVars *t, void *data)
     return TM_ECODE_OK;
 }
 
-void AlertFastLogExitPrintStats(ThreadVars *tv, void *data)
-{
-    AlertFastLogThread *aft = (AlertFastLogThread *)data;
-    if (aft == NULL) {
-        return;
-    }
-
-    //SCLogInfo("Fast log output wrote %" PRIu64 " alerts", aft->file_ctx->alerts);
-}
-
 /**
  * \brief Create a new LogFileCtx for "fast" output style.
  * \param conf The configuration node for this output.
index 47aca2afc17f06bea7c027d3be1c07592dcf08e2..8de1d3a9c211caf8f7777c9215ac96bb062a65e8 100644 (file)
@@ -367,20 +367,6 @@ static TmEcode AlertSyslogDecoderEvent(ThreadVars *tv, const Packet *p, void *da
     return TM_ECODE_OK;
 }
 
-/**
- * \brief   Function to print the total alert while closing the engine
- *
- * \param tv    Pointer to the output threadvars
- * \param data  Pointer to the AlertSyslogThread data
- */
-static void AlertSyslogExitPrintStats(ThreadVars *tv, void *data)
-{
-    AlertSyslogThread *ast = (AlertSyslogThread *)data;
-    if (ast == NULL) {
-        return;
-    }
-}
-
 static int AlertSyslogCondition(ThreadVars *tv, const Packet *p)
 {
     return (p->alerts.cnt > 0 ? TRUE : FALSE);
@@ -407,7 +393,6 @@ void AlertSyslogRegister (void)
 #ifndef OS_WIN32
     OutputRegisterPacketModule(LOGGER_ALERT_SYSLOG, MODULE_NAME, "syslog",
         AlertSyslogInitCtx, AlertSyslogLogger, AlertSyslogCondition,
-        AlertSyslogThreadInit, AlertSyslogThreadDeinit,
-        AlertSyslogExitPrintStats);
+        AlertSyslogThreadInit, AlertSyslogThreadDeinit, NULL);
 #endif /* !OS_WIN32 */
 }
index 94800005cf4ba6b649599175c6603f732a19378e..a825ae40232fa61a0aed3b814145e53e200b9d03 100644 (file)
@@ -58,7 +58,6 @@
 
 TmEcode LogHttpLogThreadInit(ThreadVars *, void *, void **);
 TmEcode LogHttpLogThreadDeinit(ThreadVars *, void *);
-void LogHttpLogExitPrintStats(ThreadVars *, void *);
 static void LogHttpLogDeInitCtx(OutputCtx *);
 
 int LogHttpLogger(ThreadVars *tv, void *thread_data, const Packet *, Flow *f, void *state, void *tx, uint64_t tx_id);
@@ -67,7 +66,7 @@ void LogHttpLogRegister (void)
 {
     OutputRegisterTxModule(LOGGER_HTTP, MODULE_NAME, "http-log",
         LogHttpLogInitCtx, ALPROTO_HTTP, LogHttpLogger, LogHttpLogThreadInit,
-        LogHttpLogThreadDeinit, LogHttpLogExitPrintStats);
+        LogHttpLogThreadDeinit, NULL);
 }
 
 #define LOG_HTTP_MAXN_NODES 64
@@ -566,16 +565,6 @@ TmEcode LogHttpLogThreadDeinit(ThreadVars *t, void *data)
     return TM_ECODE_OK;
 }
 
-void LogHttpLogExitPrintStats(ThreadVars *tv, void *data)
-{
-    LogHttpLogThread *aft = (LogHttpLogThread *)data;
-    if (aft == NULL) {
-        return;
-    }
-
-    //SCLogInfo("HTTP logger logged %" PRIu32 " requests", aft->uri_cnt);
-}
-
 /** \brief Create a new http log LogFileCtx.
  *  \param conf Pointer to ConfNode containing this loggers configuration.
  *  \return NULL if failure, LogFileCtx* to the file_ctx if succesful
index 7eb7c2444ac486d6d9bb4d2f8a13700b2d1b077d..69fe82d2053ca5b27ba66bf59a54b74d868cf69d 100644 (file)
@@ -55,7 +55,6 @@
 
 TmEcode LogStatsLogThreadInit(ThreadVars *, void *, void **);
 TmEcode LogStatsLogThreadDeinit(ThreadVars *, void *);
-void LogStatsLogExitPrintStats(ThreadVars *, void *);
 static void LogStatsLogDeInitCtx(OutputCtx *);
 
 typedef struct LogStatsFileCtx_ {
@@ -206,14 +205,6 @@ TmEcode LogStatsLogThreadDeinit(ThreadVars *t, void *data)
     return TM_ECODE_OK;
 }
 
-void LogStatsLogExitPrintStats(ThreadVars *tv, void *data)
-{
-    LogStatsLogThread *aft = (LogStatsLogThread *)data;
-    if (aft == NULL) {
-        return;
-    }
-}
-
 /** \brief Create a new http log LogFileCtx.
  *  \param conf Pointer to ConfNode containing this loggers configuration.
  *  \return NULL if failure, LogFileCtx* to the file_ctx if succesful
@@ -296,5 +287,5 @@ void LogStatsLogRegister (void)
 {
     OutputRegisterStatsModule(LOGGER_STATS, MODULE_NAME, "stats",
         LogStatsLogInitCtx, LogStatsLogger, LogStatsLogThreadInit,
-        LogStatsLogThreadDeinit, LogStatsLogExitPrintStats);
+        LogStatsLogThreadDeinit, NULL);
 }
index 00e18eec85bb1d6dab5e150663d0e98acb629afe..c2faa046ee26a0bada6de9ad77b0df702b39a4bc 100644 (file)
@@ -55,7 +55,6 @@
 
 TmEcode LogTcpDataLogThreadInit(ThreadVars *, void *, void **);
 TmEcode LogTcpDataLogThreadDeinit(ThreadVars *, void *);
-void LogTcpDataLogExitPrintStats(ThreadVars *, void *);
 static void LogTcpDataLogDeInitCtx(OutputCtx *);
 
 int LogTcpDataLogger(ThreadVars *tv, void *thread_data, const Flow *f, const uint8_t *data, uint32_t data_len, uint64_t tx_id, uint8_t flags);
@@ -63,12 +62,10 @@ int LogTcpDataLogger(ThreadVars *tv, void *thread_data, const Flow *f, const uin
 void LogTcpDataLogRegister (void) {
     OutputRegisterStreamingModule(LOGGER_TCP_DATA, MODULE_NAME, "tcp-data",
         LogTcpDataLogInitCtx, LogTcpDataLogger, STREAMING_TCP_DATA,
-        LogTcpDataLogThreadInit, LogTcpDataLogThreadDeinit,
-        LogTcpDataLogExitPrintStats);
+        LogTcpDataLogThreadInit, LogTcpDataLogThreadDeinit, NULL);
     OutputRegisterStreamingModule(LOGGER_TCP_DATA, MODULE_NAME, "http-body-data",
         LogTcpDataLogInitCtx, LogTcpDataLogger, STREAMING_HTTP_BODIES,
-        LogTcpDataLogThreadInit, LogTcpDataLogThreadDeinit,
-        LogTcpDataLogExitPrintStats);
+        LogTcpDataLogThreadInit, LogTcpDataLogThreadDeinit, NULL);
 }
 
 typedef struct LogTcpDataFileCtx_ {
@@ -224,13 +221,6 @@ TmEcode LogTcpDataLogThreadDeinit(ThreadVars *t, void *data)
     return TM_ECODE_OK;
 }
 
-void LogTcpDataLogExitPrintStats(ThreadVars *tv, void *data) {
-    LogTcpDataLogThread *aft = (LogTcpDataLogThread *)data;
-    if (aft == NULL) {
-        return;
-    }
-}
-
 /** \brief Create a new http log LogFileCtx.
  *  \param conf Pointer to ConfNode containing this loggers configuration.
  *  \return NULL if failure, LogFileCtx* to the file_ctx if succesful