/**
* \brief Function to close unified2 file
*
- * \param t Thread Variable containing input/output queue, cpu affinity etc.
* \param aun Unified2 thread variable.
*/
-
-int Unified2AlertCloseFile(ThreadVars *t, Unified2AlertThread *aun)
+static int Unified2AlertCloseFile(Unified2AlertThread *aun)
{
if (aun->unified2alert_ctx->file_ctx->fp != NULL) {
fclose(aun->unified2alert_ctx->file_ctx->fp);
/**
* \brief Function to rotate unified2 file
*
- * \param t Thread Variable containing input/output queue, cpu affinity etc.
* \param aun Unified2 thread variable.
* \retval 0 on succces
* \retval -1 on failure
*/
-
-int Unified2AlertRotateFile(ThreadVars *t, Unified2AlertThread *aun)
+static int Unified2AlertRotateFile(Unified2AlertThread *aun)
{
- if (Unified2AlertCloseFile(t,aun) < 0) {
+ if (Unified2AlertCloseFile(aun) < 0) {
SCLogError(SC_ERR_UNIFIED2_ALERT_GENERIC,
"Error: Unified2AlertCloseFile failed");
return -1;
SCMutexLock(&aun->unified2alert_ctx->file_ctx->fp_mutex);
if ((aun->unified2alert_ctx->file_ctx->size_current + length) >
aun->unified2alert_ctx->file_ctx->size_limit) {
- if (Unified2AlertRotateFile(t,aun) < 0) {
+ if (Unified2AlertRotateFile(aun) < 0) {
aun->unified2alert_ctx->file_ctx->alerts += i;
SCMutexUnlock(&aun->unified2alert_ctx->file_ctx->fp_mutex);
return -1;
if ((aun->unified2alert_ctx->file_ctx->size_current + length) >
aun->unified2alert_ctx->file_ctx->size_limit) {
- if (Unified2AlertRotateFile(tv,aun) < 0) {
+ if (Unified2AlertRotateFile(aun) < 0) {
aun->unified2alert_ctx->file_ctx->alerts += i;
SCMutexUnlock(&aun->unified2alert_ctx->file_ctx->fp_mutex);
return -1;
TimeSetIncrementTime(1);
- ret = Unified2AlertRotateFile(&tv, data);
+ ret = Unified2AlertRotateFile(data);
if (ret == -1)
goto error;