summaryrefslogtreecommitdiffstats
path: root/runtime/stream.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-08-25 11:55:41 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2012-08-25 11:55:41 +0200
commit8939ccfffd3a0580ead376234ad64a9602d4e4e6 (patch)
tree1749d023b626b2d30d9b9273b0d4f11fcbffea1b /runtime/stream.c
parent0f52727043736b1e411bc60309ed18d41a4f1234 (diff)
parent0c65e62965eefc1f8cebfaa3636ef72fc21c5260 (diff)
downloadrsyslog-8939ccfffd3a0580ead376234ad64a9602d4e4e6.tar.gz
rsyslog-8939ccfffd3a0580ead376234ad64a9602d4e4e6.tar.xz
rsyslog-8939ccfffd3a0580ead376234ad64a9602d4e4e6.zip
Merge branch 'v5-stable' into v6-stable
Conflicts: ChangeLog action.c configure.ac doc/manual.html runtime/ruleset.c template.h threads.c tools/syslogd.c
Diffstat (limited to 'runtime/stream.c')
-rw-r--r--runtime/stream.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/runtime/stream.c b/runtime/stream.c
index bb1a0a42..742799d2 100644
--- a/runtime/stream.c
+++ b/runtime/stream.c
@@ -1010,6 +1010,7 @@ asyncWriterThread(void *pPtr)
struct timespec t;
sbool bTimedOut = 0;
strm_t *pThis = (strm_t*) pPtr;
+ int err;
ISOBJ_TYPE_assert(pThis, strm);
BEGINfunc
@@ -1036,8 +1037,7 @@ asyncWriterThread(void *pPtr)
bTimedOut = 0;
timeoutComp(&t, pThis->iFlushInterval * 1000); /* *1000 millisconds */
if(pThis->bDoTimedWait) {
- if(pthread_cond_timedwait(&pThis->notEmpty, &pThis->mut, &t) != 0) {
- int err = errno;
+ if((err = pthread_cond_timedwait(&pThis->notEmpty, &pThis->mut, &t)) != 0) {
if(err == ETIMEDOUT) {
bTimedOut = 1;
} else {
@@ -1170,7 +1170,7 @@ doZipWrite(strm_t *pThis, uchar *pBuf, size_t lenBuf)
{
z_stream zstrm;
int zRet; /* zlib return state */
- sbool bzInitDone = FALSE;
+ sbool bzInitDone = RSFALSE;
DEFiRet;
assert(pThis != NULL);
assert(pBuf != NULL);
@@ -1186,7 +1186,7 @@ doZipWrite(strm_t *pThis, uchar *pBuf, size_t lenBuf)
DBGPRINTF("error %d returned from zlib/deflateInit2()\n", zRet);
ABORT_FINALIZE(RS_RET_ZLIB_ERR);
}
- bzInitDone = TRUE;
+ bzInitDone = RSTRUE;
/* now doing the compression */
zstrm.next_in = (Bytef*) pBuf; /* as of zlib doc, this must be set BEFORE DeflateInit2 */