From bcddd30c2e9d8594a67a853c389c4424aa0c6524 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 25 Mar 2010 08:13:58 +0100 Subject: undo experimental commit dccadb677c5a6b8379f631e4c1f14c8c4089d4a6 Further testing turned out that the rsyslog core works correctly and this fix is not needed. The concurrency we saw was actually caused by other actions (even processes) during directory creation. See commit 9e5b31fc44136dbcc1e443cfe7714e9daf97d844 for further details. --- tools/omfile.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'tools') diff --git a/tools/omfile.c b/tools/omfile.c index 2a14f45b..774f0b96 100644 --- a/tools/omfile.c +++ b/tools/omfile.c @@ -48,7 +48,6 @@ #include #include #include -#include #ifdef OS_SOLARIS # include @@ -66,7 +65,6 @@ #include "stream.h" #include "unicode-helper.h" #include "atomic.h" -#include "debug.h" MODULE_TYPE_OUTPUT @@ -136,7 +134,6 @@ typedef struct _instanceData { int iIOBufSize; /* size of associated io buffer */ int iFlushInterval; /* how fast flush buffer on inactivity? */ bool bFlushOnTXEnd; /* flush write buffers when transaction has ended? */ - pthread_mutex_t mutEx; /* guard ourselves against being called multiple times with the same instance */ } instanceData; @@ -619,7 +616,6 @@ finalize_it: BEGINcreateInstance CODESTARTcreateInstance pData->pStrm = NULL; - pthread_mutex_init(&pData->mutEx, NULL); ENDcreateInstance @@ -629,7 +625,6 @@ CODESTARTfreeInstance dynaFileFreeCache(pData); } else if(pData->pStrm != NULL) strm.Destruct(&pData->pStrm); - pthread_mutex_destroy(&pData->mutEx); ENDfreeInstance @@ -639,7 +634,6 @@ ENDtryResume BEGINdoAction CODESTARTdoAction - d_pthread_mutex_lock(&pData->mutEx); DBGPRINTF("file to log to: %s\n", pData->f_fname); CHKiRet(writeFile(ppString, iMsgOpts, pData)); if(pData->bFlushOnTXEnd) { @@ -647,7 +641,6 @@ CODESTARTdoAction CHKiRet(strm.Flush(pData->pStrm)); } finalize_it: - d_pthread_mutex_unlock(&pData->mutEx); ENDdoAction @@ -784,7 +777,6 @@ static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __a BEGINdoHUP CODESTARTdoHUP - d_pthread_mutex_lock(&pData->mutEx); if(pData->bDynamicName) { dynaFileFreeCacheEntries(pData); } else { @@ -793,7 +785,6 @@ CODESTARTdoHUP pData->pStrm = NULL; } } - d_pthread_mutex_unlock(&pData->mutEx); ENDdoHUP -- cgit