summaryrefslogtreecommitdiff
path: root/runtime/stream.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2011-10-21 17:03:33 +0200
committerMichael Biebl <biebl@debian.org>2011-10-21 17:03:33 +0200
commita7a3afdd81c8809fbc4927b360e1cb59e2e16b2e (patch)
tree87efee7c0a74d351e4d88e52a5b84fbd4b3b191d /runtime/stream.c
parentae82a633a4d42dfdc942d8f0f4f5e6470f13797e (diff)
downloadrsyslog-a7a3afdd81c8809fbc4927b360e1cb59e2e16b2e.tar.gz
Imported Upstream version 5.8.6upstream/5.8.6
Diffstat (limited to 'runtime/stream.c')
-rw-r--r--runtime/stream.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/runtime/stream.c b/runtime/stream.c
index ae71681..6b88d3f 100644
--- a/runtime/stream.c
+++ b/runtime/stream.c
@@ -1036,7 +1036,7 @@ asyncWriterThread(void *pPtr)
continue; /* now we should have data */
}
bTimedOut = 0;
- timeoutComp(&t, pThis->iFlushInterval * 2000); /* *1000 millisconds */ // TODO: check the 2000?!?
+ timeoutComp(&t, pThis->iFlushInterval * 1000); /* *1000 millisconds */
if(pThis->bDoTimedWait) {
if(pthread_cond_timedwait(&pThis->notEmpty, &pThis->mut, &t) != 0) {
int err = errno;
@@ -1276,16 +1276,18 @@ static rsRetVal strmSeek(strm_t *pThis, off64_t offs)
ISOBJ_TYPE_assert(pThis, strm);
- if(pThis->fd == -1)
- strmOpenFile(pThis);
- else
- strmFlushInternal(pThis);
+ if(pThis->fd == -1) {
+ CHKiRet(strmOpenFile(pThis));
+ } else {
+ CHKiRet(strmFlushInternal(pThis));
+ }
long long i;
DBGOPRINT((obj_t*) pThis, "file %d seek, pos %llu\n", pThis->fd, (long long unsigned) offs);
i = lseek64(pThis->fd, offs, SEEK_SET); // TODO: check error!
pThis->iCurrOffs = offs; /* we are now at *this* offset */
pThis->iBufPtr = 0; /* buffer invalidated */
+finalize_it:
RETiRet;
}