]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
logging: remove the packetqueue's from the logging path
authorJason Ish <ish@unx.ca>
Wed, 13 Jul 2016 16:48:14 +0000 (10:48 -0600)
committerVictor Julien <victor@inliniac.net>
Mon, 19 Sep 2016 11:47:52 +0000 (13:47 +0200)
They are not referenced by any loggers, and they probably
shouldn't be either.

src/flow-worker.c
src/output-file.c
src/output-filedata.c
src/output-packet.c
src/output-streaming.c
src/output-tx.c
src/output.c
src/output.h

index 2d981e4be7028eea1693c485534084079ddfbbcf..89894c7199b4af27d24130c711b231b69fdf0286 100644 (file)
@@ -191,7 +191,7 @@ TmEcode FlowWorker(ThreadVars *tv, Packet *p, void *data, PacketQueue *preq, Pac
             }
 
             //  Outputs
-            OutputLoggerLog(tv, x, fw->output_thread, preq, unused);
+            OutputLoggerLog(tv, x, fw->output_thread);
 
             /* put these packets in the preq queue so that they are
              * by the other thread modules before packet 'p'. */
@@ -216,7 +216,7 @@ TmEcode FlowWorker(ThreadVars *tv, Packet *p, void *data, PacketQueue *preq, Pac
     }
 
     // Outputs.
-    OutputLoggerLog(tv, p, fw->output_thread, preq, unused);
+    OutputLoggerLog(tv, p, fw->output_thread);
 
     /*  Release tcp segments. Done here after alerting can use them. */
     if (p->flow != NULL && p->proto == IPPROTO_TCP) {
index 402b398ab005faaa17c1cdc882d3e6b64df6feef..f43d63970f020cb88cef6149b52b31fa27820304 100644 (file)
@@ -90,7 +90,7 @@ int OutputRegisterFileLogger(LoggerId id, const char *name, FileLogger LogFunc,
     return 0;
 }
 
-static TmEcode OutputFileLog(ThreadVars *tv, Packet *p, void *thread_data, PacketQueue *pq, PacketQueue *postpq)
+static TmEcode OutputFileLog(ThreadVars *tv, Packet *p, void *thread_data)
 {
     BUG_ON(thread_data == NULL);
 
index 589bef6893e89df9610d89b5f76f42ddf996edd2..50cff28162769824e4ddc34a5d5deee232909f63 100644 (file)
@@ -124,7 +124,7 @@ static int CallLoggers(ThreadVars *tv, OutputLoggerThreadStore *store_list,
     return file_logged;
 }
 
-static TmEcode OutputFiledataLog(ThreadVars *tv, Packet *p, void *thread_data, PacketQueue *pq, PacketQueue *postpq)
+static TmEcode OutputFiledataLog(ThreadVars *tv, Packet *p, void *thread_data)
 {
     BUG_ON(thread_data == NULL);
 
index 3d18ad449cd6659a2c1e110afbd7e20b155aed64..fe4cc2fee825743a0421744dec6d479a76b56a00 100644 (file)
@@ -90,7 +90,7 @@ int OutputRegisterPacketLogger(LoggerId logger_id, const char *name,
     return 0;
 }
 
-static TmEcode OutputPacketLog(ThreadVars *tv, Packet *p, void *thread_data, PacketQueue *pq, PacketQueue *postpq)
+static TmEcode OutputPacketLog(ThreadVars *tv, Packet *p, void *thread_data)
 {
     BUG_ON(thread_data == NULL);
 
index 1300295700aec3d83b242aae77746f9a9cef4d4d..aae5ec55013662b03cccfcff9c144e8f62b1db60 100644 (file)
@@ -298,7 +298,7 @@ int StreamIterator(Flow *f, TcpStream *stream, int close, void *cbdata, uint8_t
     return 0;
 }
 
-static TmEcode OutputStreamingLog(ThreadVars *tv, Packet *p, void *thread_data, PacketQueue *pq, PacketQueue *postpq)
+static TmEcode OutputStreamingLog(ThreadVars *tv, Packet *p, void *thread_data)
 {
     BUG_ON(thread_data == NULL);
 
index ad24e5cb0c0b513eb863c9fcefe81560e152f5c0..339cd3b4fab80dfd1ec0aa55711f0aa05b4096db 100644 (file)
@@ -127,7 +127,7 @@ int OutputRegisterTxLogger(LoggerId id, const char *name, AppProto alproto,
     return 0;
 }
 
-static TmEcode OutputTxLog(ThreadVars *tv, Packet *p, void *thread_data, PacketQueue *pq, PacketQueue *postpq)
+static TmEcode OutputTxLog(ThreadVars *tv, Packet *p, void *thread_data)
 {
     BUG_ON(thread_data == NULL);
     if (list == NULL) {
index db742d4136eb39476d7423db55ee0b1733aa35c0..6c6ee8f805ddc15680e895f3100ebd0e2264ffc0 100644 (file)
@@ -916,15 +916,14 @@ void OutputNotifyFileRotation(void) {
     }
 }
 
-TmEcode OutputLoggerLog(ThreadVars *tv, Packet *p, void *thread_data,
-    PacketQueue *pq, PacketQueue *postpq)
+TmEcode OutputLoggerLog(ThreadVars *tv, Packet *p, void *thread_data)
 {
     LoggerThreadStore *thread_store = (LoggerThreadStore *)thread_data;
     RootLogger *logger = TAILQ_FIRST(&RootLoggers);
     LoggerThreadStoreNode *thread_store_node = TAILQ_FIRST(thread_store);
     while (logger && thread_store_node) {
         if (logger->LogFunc != NULL) {
-            logger->LogFunc(tv, p, thread_store_node->thread_data, pq, postpq);
+            logger->LogFunc(tv, p, thread_store_node->thread_data);
         }
         logger = TAILQ_NEXT(logger, entries);
         thread_store_node = TAILQ_NEXT(thread_store_node, entries);
index 5d01c904ce37625bcc28f10ae1c1d65f88fab2e8..32004a69691d1ada36932fcfc8d97f76de986ff0 100644 (file)
@@ -40,8 +40,8 @@
 
 typedef OutputCtx *(*OutputInitFunc)(ConfNode *);
 typedef OutputCtx *(*OutputInitSubFunc)(ConfNode *, OutputCtx *);
-typedef TmEcode (*OutputLogFunc)(ThreadVars *, Packet *, void *, PacketQueue *,
-    PacketQueue *);
+typedef TmEcode (*OutputLogFunc)(ThreadVars *, Packet *, void *);
+
 typedef struct OutputModule_ {
     LoggerId logger_id;
     const char *name;
@@ -197,8 +197,7 @@ void OutputRegisterRootLogger(ThreadInitFunc ThreadInit,
     OutputLogFunc LogFunc);
 void TmModuleLoggerRegister(void);
 
-TmEcode OutputLoggerLog(ThreadVars *, Packet *, void *, PacketQueue *,
-    PacketQueue *);
+TmEcode OutputLoggerLog(ThreadVars *, Packet *, void *);
 TmEcode OutputLoggerThreadInit(ThreadVars *, void *, void **);
 TmEcode OutputLoggerThreadDeinit(ThreadVars *, void *);
 void OutputLoggerExitPrintStats(ThreadVars *, void *);