log-tlslog: remove ThreadExitPrintStats callback

Remove the ThreadExitPrintStats callback, this is the only logger that
was actually using it, and this logger is marked for deprecation. This
allows us to remove the callback from the registration signature.

Ticket: #7227
pull/11689/head
Jason Ish 2 years ago committed by Victor Julien
parent 594cca77ce
commit 6e660bd9bc

@ -83,11 +83,6 @@ typedef struct LogTlsFileCtx_ {
typedef struct LogTlsLogThread_ {
LogTlsFileCtx *tlslog_ctx;
/* LogTlsFileCtx has the pointer to the file and a mutex to allow
multithreading. */
uint32_t tls_cnt;
MemBuffer *buffer;
} LogTlsLogThread;
@ -185,16 +180,6 @@ static void LogTlsLogDeInitCtx(OutputCtx *output_ctx)
SCFree(output_ctx);
}
static void LogTlsLogExitPrintStats(ThreadVars *tv, void *data)
{
LogTlsLogThread *aft = (LogTlsLogThread *)data;
if (aft == NULL) {
return;
}
SCLogInfo("TLS logger logged %" PRIu32 " requests", aft->tls_cnt);
}
/** \brief Create a new tls log LogFileCtx.
* \param conf Pointer to ConfNode containing this loggers configuration.
* \return NULL if failure, LogFileCtx* to the file_ctx if succesful
@ -514,8 +499,6 @@ static int LogTlsLogger(ThreadVars *tv, void *thread_data, const Packet *p,
MemBufferWriteString(aft->buffer, "\n");
aft->tls_cnt++;
hlog->file_ctx->Write((const char *)MEMBUFFER_BUFFER(aft->buffer),
MEMBUFFER_OFFSET(aft->buffer), hlog->file_ctx);
@ -524,8 +507,7 @@ static int LogTlsLogger(ThreadVars *tv, void *thread_data, const Packet *p,
void LogTlsLogRegister(void)
{
OutputRegisterTxModuleWithProgress(LOGGER_TLS, MODULE_NAME, "tls-log",
LogTlsLogInitCtx, ALPROTO_TLS, LogTlsLogger, TLS_HANDSHAKE_DONE,
TLS_HANDSHAKE_DONE, LogTlsLogThreadInit, LogTlsLogThreadDeinit,
LogTlsLogExitPrintStats);
OutputRegisterTxModuleWithProgress(LOGGER_TLS, MODULE_NAME, "tls-log", LogTlsLogInitCtx,
ALPROTO_TLS, LogTlsLogger, TLS_HANDSHAKE_DONE, TLS_HANDSHAKE_DONE, LogTlsLogThreadInit,
LogTlsLogThreadDeinit, NULL);
}

Loading…
Cancel
Save