Skip to content

Commit

Permalink
tlsstore: remove ThreadExitPrintStats callback
Browse files Browse the repository at this point in the history
Remove the callback to print stats on thread exit.  The counter value
was never being used and this helps us get rid of this callback
altogether as their is only one other usage of it.

Ticket: OISF#7227
  • Loading branch information
jasonish authored and Corey Thomas committed Sep 3, 2024
1 parent b0a232a commit 0bee140
Showing 1 changed file with 4 additions and 17 deletions.
21 changes: 4 additions & 17 deletions src/log-tlsstore.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ static char logging_dir_not_writable;
#define LOGGING_WRITE_ISSUE_LIMIT 6

typedef struct LogTlsStoreLogThread_ {
uint32_t tls_cnt;

uint8_t* enc_buf;
size_t enc_buf_len;
} LogTlsStoreLogThread;
Expand Down Expand Up @@ -384,16 +382,6 @@ static TmEcode LogTlsStoreLogThreadDeinit(ThreadVars *t, void *data)
return TM_ECODE_OK;
}

static void LogTlsStoreLogExitPrintStats(ThreadVars *tv, void *data)
{
LogTlsStoreLogThread *aft = (LogTlsStoreLogThread *)data;
if (aft == NULL) {
return;
}

SCLogInfo("(%s) certificates extracted %" PRIu32 "", tv->name, aft->tls_cnt);
}

/**
* \internal
*
Expand Down Expand Up @@ -447,14 +435,13 @@ static OutputInitResult LogTlsStoreLogInitCtx(ConfNode *conf)

void LogTlsStoreRegister (void)
{
OutputRegisterTxModuleWithCondition(LOGGER_TLS_STORE, MODULE_NAME,
"tls-store", LogTlsStoreLogInitCtx, ALPROTO_TLS, LogTlsStoreLogger,
LogTlsStoreCondition, LogTlsStoreLogThreadInit,
LogTlsStoreLogThreadDeinit, LogTlsStoreLogExitPrintStats);
OutputRegisterTxModuleWithCondition(LOGGER_TLS_STORE, MODULE_NAME, "tls-store",
LogTlsStoreLogInitCtx, ALPROTO_TLS, LogTlsStoreLogger, LogTlsStoreCondition,
LogTlsStoreLogThreadInit, LogTlsStoreLogThreadDeinit, NULL);

OutputRegisterTxModuleWithCondition(LOGGER_TLS_STORE_CLIENT, MODULE_NAME, "tls-store",
LogTlsStoreLogInitCtx, ALPROTO_TLS, LogTlsStoreLoggerClient, LogTlsStoreConditionClient,
LogTlsStoreLogThreadInit, LogTlsStoreLogThreadDeinit, LogTlsStoreLogExitPrintStats);
LogTlsStoreLogThreadInit, LogTlsStoreLogThreadDeinit, NULL);

SC_ATOMIC_INIT(cert_id);
SC_ATOMIC_SET(cert_id, 1);
Expand Down

0 comments on commit 0bee140

Please sign in to comment.