From: Jason Ish Date: Fri, 27 May 2016 19:16:22 +0000 (-0600) Subject: logging: convert alert debug log to non-thread module X-Git-Tag: suricata-3.2beta1~365 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7cb16bc90d9fadc5ea821c1b426539944ac3e2fd;p=thirdparty%2Fsuricata.git logging: convert alert debug log to non-thread module --- diff --git a/src/alert-debuglog.c b/src/alert-debuglog.c index 212e90c161..1c0b4640dc 100644 --- a/src/alert-debuglog.c +++ b/src/alert-debuglog.c @@ -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); } diff --git a/src/tm-modules.c b/src/tm-modules.c index cab1538384..d12089d0aa 100644 --- a/src/tm-modules.c +++ b/src/tm-modules.c @@ -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); diff --git a/src/tm-threads-common.h b/src/tm-threads-common.h index b528053b1e..0938b2f611 100644 --- a/src/tm-threads-common.h +++ b/src/tm-threads-common.h @@ -41,7 +41,6 @@ typedef enum { TMM_DECODEPCAPFILE, TMM_RECEIVEPFRING, TMM_DECODEPFRING, - TMM_ALERTDEBUGLOG, TMM_RESPONDREJECT, TMM_LOGTLSLOG, TMM_OUTPUTJSON,