diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2010-10-15 16:39:10 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2010-10-15 16:39:10 +0200 |
commit | 90933057bc2f014fd2124ba7d830652e9b1ead96 (patch) | |
tree | f700e10fb46770b06ff259872ccbcde116009240 /plugins | |
parent | e1437c7aa43df135b93aac1d2d3c7323b91c8ad4 (diff) | |
download | rsyslog-90933057bc2f014fd2124ba7d830652e9b1ead96.tar.gz rsyslog-90933057bc2f014fd2124ba7d830652e9b1ead96.tar.xz rsyslog-90933057bc2f014fd2124ba7d830652e9b1ead96.zip |
imfile: bugfixes in regard to large files (> 2GB)
- bugfix: a couple of problems that imfile had on some platforms, namely
Ubuntu (not their fault, but occured there)
- bugfix: imfile utilizes 32 bit to track offset. Most importantly,
this problem can not experienced on Fedora 64 bit OS (which has
64 bit long's!)
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/imfile/imfile.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/imfile/imfile.c b/plugins/imfile/imfile.c index 7c588f90..e16f26f8 100644 --- a/plugins/imfile/imfile.c +++ b/plugins/imfile/imfile.c @@ -359,12 +359,14 @@ persistStrmState(fileInfo_t *pInfo) { DEFiRet; strm_t *psSF = NULL; /* state file (stream) */ + size_t lenDir; ASSERT(pInfo != NULL); /* TODO: create a function persistObj in obj.c? */ CHKiRet(strm.Construct(&psSF)); - CHKiRet(strm.SetDir(psSF, glbl.GetWorkDir(), strlen((char*)glbl.GetWorkDir()))); + lenDir = strlen((char*)glbl.GetWorkDir()); + CHKiRet(strm.SetDir(psSF, glbl.GetWorkDir(), lenDir)); CHKiRet(strm.SettOperationsMode(psSF, STREAMMODE_WRITE_TRUNC)); CHKiRet(strm.SetsType(psSF, STREAMTYPE_FILE_SINGLE)); CHKiRet(strm.SetFName(psSF, pInfo->pszStateFile, strlen((char*) pInfo->pszStateFile))); |