From 35bafbef04a8f7ba56abebbed337f79b8d6dd67f Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Wed, 20 Mar 2013 17:05:18 +0100 Subject: 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 --- plugins/imfile/imfile.c | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins/imfile/imfile.c') 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 -- cgit v1.2.3