diff options
author | Michael Biebl <biebl@debian.org> | 2013-03-27 12:03:58 +0100 |
---|---|---|
committer | Michael Biebl <biebl@debian.org> | 2013-03-27 12:03:58 +0100 |
commit | d7c2f609d30d5e4d2c69dd2dc7305bd8ec5736ec (patch) | |
tree | ab4cde54583b0e1eb92fdafe0eb7282b7923daa9 /plugins/imfile/imfile.c | |
parent | 86831d7a4f485e19befa8cc500d17766798ad07c (diff) | |
download | rsyslog-upstream/7.3.9.tar.gz |
Imported Upstream version 7.3.9upstream/7.3.9
Diffstat (limited to 'plugins/imfile/imfile.c')
-rw-r--r-- | plugins/imfile/imfile.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/imfile/imfile.c b/plugins/imfile/imfile.c index 0f155c1..349acea 100644 --- a/plugins/imfile/imfile.c +++ b/plugins/imfile/imfile.c @@ -235,6 +235,7 @@ openFile(fileInfo_t *pThis) /* read back in the object */ CHKiRet(obj.Deserialize(&pThis->pStrm, (uchar*) "strm", psSF, NULL, pThis)); + strm.CheckFileChange(pThis->pStrm); CHKiRet(strm.SeekCurrOffs(pThis->pStrm)); /* note: we do not delete the state file, so that the last position remains @@ -738,12 +739,20 @@ persistStrmState(fileInfo_t *pInfo) CHKiRet(strm.ConstructFinalize(psSF)); CHKiRet(strm.Serialize(pInfo->pStrm, psSF)); + CHKiRet(strm.Flush(psSF)); CHKiRet(strm.Destruct(&psSF)); finalize_it: if(psSF != NULL) strm.Destruct(&psSF); + + if(iRet != RS_RET_OK) { + errmsg.LogError(0, iRet, "imfile: could not persist state " + "file %s - data may be repeated on next " + "startup. Is WorkDirectory set?", + pInfo->pszStateFile); + } RETiRet; } |