]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
logging: convert alert debug log to non-thread module
authorJason Ish <ish@unx.ca>
Fri, 27 May 2016 19:16:22 +0000 (13:16 -0600)
committerVictor Julien <victor@inliniac.net>
Mon, 19 Sep 2016 11:47:52 +0000 (13:47 +0200)
src/alert-debuglog.c
src/tm-modules.c
src/tm-threads-common.h

index 212e90c16161dd3be9ac19da07800d85cdaa2e1a..1c0b4640dcbb95540070c5932343c600b836df10 100644 (file)
@@ -512,15 +512,8 @@ static int AlertDebugLogLogger(ThreadVars *tv, void *thread_data, const Packet *
 
 void TmModuleAlertDebugLogRegister (void)
 {
-    tmm_modules[TMM_ALERTDEBUGLOG].name = MODULE_NAME;
-    tmm_modules[TMM_ALERTDEBUGLOG].ThreadInit = AlertDebugLogThreadInit;
-    tmm_modules[TMM_ALERTDEBUGLOG].Func = NULL;
-    tmm_modules[TMM_ALERTDEBUGLOG].ThreadExitPrintStats = AlertDebugLogExitPrintStats;
-    tmm_modules[TMM_ALERTDEBUGLOG].ThreadDeinit = AlertDebugLogThreadDeinit;
-    tmm_modules[TMM_ALERTDEBUGLOG].RegisterTests = NULL;
-    tmm_modules[TMM_ALERTDEBUGLOG].cap_flags = 0;
-    tmm_modules[TMM_ALERTDEBUGLOG].flags = TM_FLAG_LOGAPI_TM;
-
     OutputRegisterPacketModule(MODULE_NAME, "alert-debug",
-        AlertDebugLogInitCtx, AlertDebugLogLogger, AlertDebugLogCondition, NULL, NULL, NULL);
+        AlertDebugLogInitCtx, AlertDebugLogLogger, AlertDebugLogCondition,
+        AlertDebugLogThreadInit, AlertDebugLogThreadDeinit,
+        AlertDebugLogExitPrintStats);
 }
index cab153838463fd79a65daebf19aa51821284c023..d12089d0aae5973ec91d5a4be364238b3604e4cc 100644 (file)
@@ -211,7 +211,6 @@ const char * TmModuleTmmIdToString(TmmId id)
         CASE_CODE (TMM_DECODEPCAPFILE);
         CASE_CODE (TMM_RECEIVEPFRING);
         CASE_CODE (TMM_DECODEPFRING);
-        CASE_CODE (TMM_ALERTDEBUGLOG);
         CASE_CODE (TMM_RESPONDREJECT);
         CASE_CODE (TMM_LOGTLSLOG);
         CASE_CODE (TMM_PCAPLOG);
index b528053b1e67d1f7e1bff82c15cd00f6afd7e430..0938b2f611d518ba30c649fc989e9ec942bcd957 100644 (file)
@@ -41,7 +41,6 @@ typedef enum {
     TMM_DECODEPCAPFILE,
     TMM_RECEIVEPFRING,
     TMM_DECODEPFRING,
-    TMM_ALERTDEBUGLOG,
     TMM_RESPONDREJECT,
     TMM_LOGTLSLOG,
     TMM_OUTPUTJSON,