summaryrefslogtreecommitdiffstats
path: root/runtime/stream.h
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 /runtime/stream.h
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 'runtime/stream.h')
-rw-r--r--runtime/stream.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/runtime/stream.h b/runtime/stream.h
index b7e74074..b7cc6d36 100644
--- a/runtime/stream.h
+++ b/runtime/stream.h
@@ -112,6 +112,7 @@ typedef struct strm_s {
int lenDir;
int fd; /* the file descriptor, -1 if closed */
int fdDir; /* the directory's descriptor, in case bSync is requested (-1 if closed) */
+ ino_t inode; /* current inode for files being monitored (undefined else) */
uchar *pszCurrFName; /* name of current file (if open) */
uchar *pIOBuf; /* the iobuffer currently in use to gather data */
size_t iBufPtrMax; /* current max Ptr in Buffer (if partial read!) */
@@ -187,8 +188,10 @@ BEGINinterface(strm) /* name must also be changed in ENDinterface macro! */
rsRetVal (*ReadLine)(strm_t *pThis, cstr_t **ppCStr, int mode);
/* v7 added 2012-09-14 */
INTERFACEpropSetMeth(strm, bVeryReliableZip, int);
+ /* v8 added 2013-03-21 */
+ rsRetVal (*CheckFileChange)(strm_t *pThis);
ENDinterface(strm)
-#define strmCURR_IF_VERSION 7 /* increment whenever you change the interface structure! */
+#define strmCURR_IF_VERSION 8 /* increment whenever you change the interface structure! */
static inline int
strmGetCurrFileNum(strm_t *pStrm) {