diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2010-06-23 12:48:27 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2010-06-23 12:48:27 +0200 |
commit | f48128f34a17aae7e7b9405fe32b396db45443ca (patch) | |
tree | a122a65d4a2495570b5d8662fd75a1104cb0c521 /runtime/stream.c | |
parent | d6a3b08f56cc608bc832251cd49e86e71d9574dc (diff) | |
download | rsyslog-f48128f34a17aae7e7b9405fe32b396db45443ca.tar.gz rsyslog-f48128f34a17aae7e7b9405fe32b396db45443ca.tar.xz rsyslog-f48128f34a17aae7e7b9405fe32b396db45443ca.zip |
fixed a couple of regressions
by implementing some code that was missing so far ;) as well as
finding some real bugs. I also did some general cleanup, removing
debug strings and such. This code should be fairly OK to use, except
when "exec only when previous action was suspended" is used -- this is
NOT yet re-implemented in the tuned engine.
Diffstat (limited to 'runtime/stream.c')
-rw-r--r-- | runtime/stream.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/runtime/stream.c b/runtime/stream.c index e0b97f9f..b4295762 100644 --- a/runtime/stream.c +++ b/runtime/stream.c @@ -937,7 +937,6 @@ asyncWriterThread(void *pPtr) while(1) { /* loop broken inside */ d_pthread_mutex_lock(&pThis->mut); -dbgprintf("XXX: asyncWriterThread iterating %s\n", pThis->pszFName); while(pThis->iCnt == 0) { if(pThis->bStopWriter) { pthread_cond_broadcast(&pThis->isEmpty); @@ -953,7 +952,6 @@ dbgprintf("XXX: asyncWriterThread iterating %s\n", pThis->pszFName); bTimedOut = 0; timeoutComp(&t, pThis->iFlushInterval * 2000); /* *1000 millisconds */ // TODO: check the 2000?!? if(pThis->bDoTimedWait) { -dbgprintf("asyncWriter thread going to timeout sleep\n"); if(pthread_cond_timedwait(&pThis->notEmpty, &pThis->mut, &t) != 0) { int err = errno; if(err == ETIMEDOUT) { @@ -967,16 +965,13 @@ dbgprintf("asyncWriter thread going to timeout sleep\n"); } } } else { -dbgprintf("asyncWriter thread going to eternal sleep\n"); d_pthread_cond_wait(&pThis->notEmpty, &pThis->mut); } -dbgprintf("asyncWriter woke up\n"); } bTimedOut = 0; /* we may have timed out, but there *is* work to do... */ iDeq = pThis->iDeq++ % STREAM_ASYNC_NUMBUFS; -dbgprintf("asyncWriter writes data\n"); doWriteInternal(pThis, pThis->asyncBuf[iDeq].pBuf, pThis->asyncBuf[iDeq].lenBuf); // TODO: error check????? 2009-07-06 |