summaryrefslogtreecommitdiffstats
path: root/plugins/imfile/imfile.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2013-03-20 17:05:18 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2013-03-20 17:05:18 +0100
commit35bafbef04a8f7ba56abebbed337f79b8d6dd67f (patch)
tree6ee0631b2fc091b1759adbff7f3823f0dab65335 /plugins/imfile/imfile.c
parent136a9828452486da97578fc5a2e870143279dceb (diff)
downloadrsyslog-35bafbef04a8f7ba56abebbed337f79b8d6dd67f.tar.gz
rsyslog-35bafbef04a8f7ba56abebbed337f79b8d6dd67f.tar.bz2
rsyslog-35bafbef04a8f7ba56abebbed337f79b8d6dd67f.zip
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 is now detected and the new file being forwarded right from the beginning. closes: http://bugzilla.adiscon.com/show_bug.cgi?id=228
Diffstat (limited to 'plugins/imfile/imfile.c')
-rw-r--r--plugins/imfile/imfile.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/imfile/imfile.c b/plugins/imfile/imfile.c
index 0f155c10..6ce08fd4 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