summaryrefslogtreecommitdiffstats
path: root/runtime/stream.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-10-17 14:53:22 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2011-10-17 14:53:22 +0200
commit359ddad3c5dce82ab48964c1d8b804c4155ea39c (patch)
tree8e93dffd3eff113cc05537d9699d5065dcb06ee4 /runtime/stream.c
parent26a668f8fa352e63aefcc762eadd123002b3895d (diff)
parent943a2070a6f556c48a903d55da0317b5942a41b6 (diff)
downloadrsyslog-359ddad3c5dce82ab48964c1d8b804c4155ea39c.tar.gz
rsyslog-359ddad3c5dce82ab48964c1d8b804c4155ea39c.tar.bz2
rsyslog-359ddad3c5dce82ab48964c1d8b804c4155ea39c.zip
Merge branch 'beta'
Conflicts: ChangeLog configure.ac doc/manual.html
Diffstat (limited to 'runtime/stream.c')
-rw-r--r--runtime/stream.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/runtime/stream.c b/runtime/stream.c
index ae716815..0238d25e 100644
--- a/runtime/stream.c
+++ b/runtime/stream.c
@@ -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;
}