diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-06-08 18:39:06 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-06-08 18:39:06 +0200 |
commit | 8d1e2e496c6a4a4d40d1e8604c746e0d32013536 (patch) | |
tree | f98dfe6ae70878b49135de308703f9096c0b394b /runtime/stream.h | |
parent | 84b786753744d9f7a002665571a428283feae248 (diff) | |
download | rsyslog-8d1e2e496c6a4a4d40d1e8604c746e0d32013536.tar.gz rsyslog-8d1e2e496c6a4a4d40d1e8604c746e0d32013536.tar.xz rsyslog-8d1e2e496c6a4a4d40d1e8604c746e0d32013536.zip |
improved error handling and added fsync() support
... restoring missing functionality after the restructuring of imfile. As
a side-effect, this also lays the foundation for even more reliable queue
engine operations (but this is not yet done).
Diffstat (limited to 'runtime/stream.h')
-rw-r--r-- | runtime/stream.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/runtime/stream.h b/runtime/stream.h index 7eb386fb..a66108b7 100644 --- a/runtime/stream.h +++ b/runtime/stream.h @@ -103,10 +103,12 @@ typedef struct strm_s { int64 iCurrOffs;/* current offset */ int64 *pUsrWCntr; /* NULL or a user-provided counter that receives the nbr of bytes written since the last CntrSet() */ /* dynamic properties, valid only during file open, not to be persistet */ - size_t sIOBufSize;/* size of IO buffer */ + int bSync; /* sync this file after every write? */ + size_t sIOBufSize;/* size of IO buffer */ uchar *pszDir; /* Directory */ int lenDir; int fd; /* the file descriptor, -1 if closed */ + int fdDir; /* the directory's descriptor, in case bSync is requested (-1 if closed) */ uchar *pszCurrFName; /* name of current file (if open) */ uchar *pIOBuf; /* io Buffer */ size_t iBufPtrMax; /* current max Ptr in Buffer (if partial read!) */ @@ -148,6 +150,7 @@ BEGINinterface(strm) /* name must also be changed in ENDinterface macro! */ INTERFACEpropSetMeth(strm, tOpenMode, mode_t); INTERFACEpropSetMeth(strm, sType, strmType_t); INTERFACEpropSetMeth(strm, iZipLevel, int); + INTERFACEpropSetMeth(strm, bSync, int); INTERFACEpropSetMeth(strm, sIOBufSize, size_t); ENDinterface(strm) #define strmCURR_IF_VERSION 1 /* increment whenever you change the interface structure! */ |