diff options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | plugins/imfile/imfile.c | 8 |
2 files changed, 10 insertions, 0 deletions
@@ -3,6 +3,8 @@ Version 7.3.9 [devel] 2013-03-?? - imuxsock: add ability to NOT create/delete sockets during startup and shutdown closes: http://bugzilla.adiscon.com/show_bug.cgi?id=259 +- imfile: errors persisting state file are now reported + closes: http://bugzilla.adiscon.com/show_bug.cgi?id=292 - imfile: now detects file change when rsyslog was inactive Previosly, this case could not be detected, so if a file was overwritten or rotated away while rsyslog was stopped, some data was missing. This diff --git a/plugins/imfile/imfile.c b/plugins/imfile/imfile.c index 6ce08fd4..349acead 100644 --- a/plugins/imfile/imfile.c +++ b/plugins/imfile/imfile.c @@ -739,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; } |