summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)));