summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2010-03-19 09:42:46 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2010-03-19 09:42:46 +0100
commit89216d6a96ea5f6d1fa9893d56fa877a2131d390 (patch)
tree9dd547e22ac13397762ceed15dad1694258cea67
parent9cdcba0bdc8b8d2df8d06784f3c4f0066c90fd40 (diff)
downloadrsyslog-89216d6a96ea5f6d1fa9893d56fa877a2131d390.tar.gz
rsyslog-89216d6a96ea5f6d1fa9893d56fa877a2131d390.tar.xz
rsyslog-89216d6a96ea5f6d1fa9893d56fa877a2131d390.zip
fixed regression from previos (yet unrelease) $omfileFlushOnTXEnd fixtemp.4.6.1.10
The previous fix fixed an issue with on/off bying used in the exact wrong semantic. It corrected the situation, but failed to fix one spot where the wrong semantics were used. This is done with this commit. Note that this is NOT a bug seen in any released version.
-rw-r--r--runtime/stream.c3
-rwxr-xr-xtests/asynwr_deadlock4.sh4
-rw-r--r--tools/omfile.c2
3 files changed, 6 insertions, 3 deletions
diff --git a/runtime/stream.c b/runtime/stream.c
index e2f6623e..bfeecee5 100644
--- a/runtime/stream.c
+++ b/runtime/stream.c
@@ -641,6 +641,9 @@ static rsRetVal strmConstructFinalize(strm_t *pThis)
}
}
+ DBGPRINTF("file stream %s params: flush interval %d, async write %d\n",
+ (pThis->pszFName == NULL) ? "N/A" : (char*)pThis->pszFName,
+ pThis->iFlushInterval, pThis->bAsyncWrite);
/* if we have a flush interval, we need to do async writes in any case */
if(pThis->iFlushInterval != 0) {
pThis->bAsyncWrite = 1;
diff --git a/tests/asynwr_deadlock4.sh b/tests/asynwr_deadlock4.sh
index cf1beddb..a3452f5b 100755
--- a/tests/asynwr_deadlock4.sh
+++ b/tests/asynwr_deadlock4.sh
@@ -12,8 +12,8 @@ echo ===========================================================================
echo TEST: \[asynwr_deadlock4.sh\]: a case known to have caused a deadlock in the past
source $srcdir/diag.sh init
# uncomment for debugging support:
-export RSYSLOG_DEBUG="debug nostdout noprintmutexaction"
-export RSYSLOG_DEBUGLOG="log"
+#export RSYSLOG_DEBUG="debug nostdout noprintmutexaction"
+#export RSYSLOG_DEBUGLOG="log"
source $srcdir/diag.sh startup asynwr_deadlock4.conf
# send 20000 messages, each close to 2K (non-randomized!), so that we can fill
# the buffers and hopefully run into the "deadlock".
diff --git a/tools/omfile.c b/tools/omfile.c
index 438f8c4a..c4e834cc 100644
--- a/tools/omfile.c
+++ b/tools/omfile.c
@@ -413,7 +413,7 @@ prepareFile(instanceData *pData, uchar *newFileName)
* async processing, which is a real performance waste if we do not do buffered
* writes! -- rgerhards, 2009-07-06
*/
- if(pData->bFlushOnTXEnd)
+ if(!pData->bFlushOnTXEnd)
CHKiRet(strm.SetiFlushInterval(pData->pStrm, pData->iFlushInterval));
if(pData->pszSizeLimitCmd != NULL)
CHKiRet(strm.SetpszSizeLimitCmd(pData->pStrm, ustrdup(pData->pszSizeLimitCmd)));