]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
output/stats: use unique thread data name
authorVictor Julien <vjulien@oisf.net>
Sun, 6 Feb 2022 12:53:05 +0000 (13:53 +0100)
committerVictor Julien <vjulien@oisf.net>
Sun, 6 Feb 2022 13:00:04 +0000 (14:00 +0100)
src/output-stats.c

index d04f1b22b72bd828566fedf2a21349087f1801ac..7079c785ad71fb3394460216824b7dd89c322db5 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2014 Open Information Security Foundation
+/* Copyright (C) 2014-2022 Open Information Security Foundation
  *
  * You can copy, redistribute or modify this Program under the terms of
  * the GNU General Public License version 2 as published by the Free
@@ -35,9 +35,9 @@ typedef struct OutputLoggerThreadStore_ {
 
 /** per thread data for this module, contains a list of per thread
  *  data for the packet loggers. */
-typedef struct OutputLoggerThreadData_ {
+typedef struct OutputStatsLoggerThreadData_ {
     OutputLoggerThreadStore *store;
-} OutputLoggerThreadData;
+} OutputStatsLoggerThreadData;
 
 /* logger instance, a module + a output ctx,
  * it's perfectly valid that have multiple instances of the same
@@ -89,7 +89,7 @@ TmEcode OutputStatsLog(ThreadVars *tv, void *thread_data, StatsTable *st)
     DEBUG_VALIDATE_BUG_ON(thread_data == NULL);
     DEBUG_VALIDATE_BUG_ON(list == NULL);
 
-    OutputLoggerThreadData *op_thread_data = (OutputLoggerThreadData *)thread_data;
+    OutputStatsLoggerThreadData *op_thread_data = (OutputStatsLoggerThreadData *)thread_data;
     OutputStatsLogger *logger = list;
     OutputLoggerThreadStore *store = op_thread_data->store;
 
@@ -117,7 +117,7 @@ TmEcode OutputStatsLog(ThreadVars *tv, void *thread_data, StatsTable *st)
  *  loggers */
 static TmEcode OutputStatsLogThreadInit(ThreadVars *tv, const void *initdata, void **data)
 {
-    OutputLoggerThreadData *td = SCMalloc(sizeof(*td));
+    OutputStatsLoggerThreadData *td = SCMalloc(sizeof(*td));
     if (td == NULL)
         return TM_ECODE_FAILED;
     memset(td, 0x00, sizeof(*td));
@@ -160,7 +160,7 @@ static TmEcode OutputStatsLogThreadInit(ThreadVars *tv, const void *initdata, vo
 
 static TmEcode OutputStatsLogThreadDeinit(ThreadVars *tv, void *thread_data)
 {
-    OutputLoggerThreadData *op_thread_data = (OutputLoggerThreadData *)thread_data;
+    OutputStatsLoggerThreadData *op_thread_data = (OutputStatsLoggerThreadData *)thread_data;
     OutputLoggerThreadStore *store = op_thread_data->store;
     OutputStatsLogger *logger = list;
 
@@ -180,7 +180,7 @@ static TmEcode OutputStatsLogThreadDeinit(ThreadVars *tv, void *thread_data)
 
 static void OutputStatsLogExitPrintStats(ThreadVars *tv, void *thread_data)
 {
-    OutputLoggerThreadData *op_thread_data = (OutputLoggerThreadData *)thread_data;
+    OutputStatsLoggerThreadData *op_thread_data = (OutputStatsLoggerThreadData *)thread_data;
     OutputLoggerThreadStore *store = op_thread_data->store;
     OutputStatsLogger *logger = list;