From 5f72832b3d6c2acd076b9ebfd3484877fc506ebc Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 11 Apr 2013 14:49:06 +0200 Subject: logenc: milestone: rsyslog writes .encinfo side files --- runtime/stream.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'runtime/stream.c') diff --git a/runtime/stream.c b/runtime/stream.c index b31520b0..b0df8418 100644 --- a/runtime/stream.c +++ b/runtime/stream.c @@ -45,6 +45,7 @@ #include #include #include +#include #include /* required for HP UX */ #include #include @@ -388,6 +389,7 @@ strmWaitAsyncWriterDone(strm_t *pThis) */ static rsRetVal strmCloseFile(strm_t *pThis) { + off64_t currOffs; DEFiRet; ASSERT(pThis != NULL); @@ -408,11 +410,12 @@ static rsRetVal strmCloseFile(strm_t *pThis) * against this. -- rgerhards, 2010-03-19 */ if(pThis->fd != -1) { + currOffs = lseek64(pThis->fd, 0, SEEK_CUR); close(pThis->fd); pThis->fd = -1; pThis->inode = 0; if(pThis->cryprov != NULL) { - pThis->cryprov->OnFileClose(pThis->cryprovFileData); + pThis->cryprov->OnFileClose(pThis->cryprovFileData, currOffs); pThis->cryprovFileData = NULL; } } -- cgit v1.2.3