diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2013-03-20 18:10:17 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-03-20 18:10:17 +0100 |
commit | b96674bbc9439f107c700d75e69268ee75e0387e (patch) | |
tree | b92f5aa248d02f9078c7c034c0117c3348cec529 /plugins/imfile/imfile.c | |
parent | 3e0c277d3606b3dd871ac3b3d5bf6fe872778eb2 (diff) | |
download | rsyslog-b96674bbc9439f107c700d75e69268ee75e0387e.tar.gz rsyslog-b96674bbc9439f107c700d75e69268ee75e0387e.tar.bz2 rsyslog-b96674bbc9439f107c700d75e69268ee75e0387e.zip |
imfile: errors persisting state file are now reported
closes: http://bugzilla.adiscon.com/show_bug.cgi?id=292
Diffstat (limited to 'plugins/imfile/imfile.c')
-rw-r--r-- | plugins/imfile/imfile.c | 8 |
1 files changed, 8 insertions, 0 deletions
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; } |