summaryrefslogtreecommitdiffstats
path: root/runtime/stream.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-06-04 15:59:37 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-06-04 15:59:37 +0200
commit76da7f9f4e3dc900046a1956153d10532f2b1ae0 (patch)
treef8d6c17b4d968a63fd07e7500ba020cdce37cd8a /runtime/stream.c
parentf2800ba261d2fb7466cbdebbf80afe92f0bffd3d (diff)
downloadrsyslog-76da7f9f4e3dc900046a1956153d10532f2b1ae0.tar.gz
rsyslog-76da7f9f4e3dc900046a1956153d10532f2b1ae0.tar.xz
rsyslog-76da7f9f4e3dc900046a1956153d10532f2b1ae0.zip
added $OMFileIOBufferSize config directive and plumbing
Diffstat (limited to 'runtime/stream.c')
-rw-r--r--runtime/stream.c21
1 files changed, 2 insertions, 19 deletions
diff --git a/runtime/stream.c b/runtime/stream.c
index abcfce0c..a4844d2b 100644
--- a/runtime/stream.c
+++ b/runtime/stream.c
@@ -94,7 +94,6 @@ static rsRetVal strmOpenFile(strm_t *pThis)
}
}
-RUNLOG_VAR("%d", pThis->tOperationsMode);
/* compute which flags we need to provide to open */
switch(pThis->tOperationsMode) {
case STREAMMODE_READ:
@@ -113,9 +112,6 @@ RUNLOG_VAR("%d", pThis->tOperationsMode);
break;
}
- iFlags |= pThis->iAddtlOpenFlags; // TODO: remove this!
-dbgprintf("XXX: open with flags %d\n", iFlags);
-
pThis->fd = open((char*)pThis->pszCurrFName, iFlags, pThis->tOpenMode);
if(pThis->fd == -1) {
int ierrnoSave = errno;
@@ -763,6 +759,7 @@ DEFpropSetMeth(strm, tOperationsMode, int)
DEFpropSetMeth(strm, tOpenMode, mode_t)
DEFpropSetMeth(strm, sType, strmType_t)
DEFpropSetMeth(strm, iZipLevel, int)
+DEFpropSetMeth(strm, sIOBufSize, size_t)
static rsRetVal strmSetiMaxFiles(strm_t *pThis, int iNewVal)
{
@@ -771,19 +768,6 @@ static rsRetVal strmSetiMaxFiles(strm_t *pThis, int iNewVal)
return RS_RET_OK;
}
-static rsRetVal strmSetiAddtlOpenFlags(strm_t *pThis, int iNewVal)
-{
- DEFiRet;
-
- if(iNewVal & O_APPEND)
- ABORT_FINALIZE(RS_RET_PARAM_ERROR);
-
- pThis->iAddtlOpenFlags = iNewVal;
-
-finalize_it:
- RETiRet;
-}
-
/* set the stream's file prefix
* The passed-in string is duplicated. So if the caller does not need
@@ -829,7 +813,6 @@ strmSetDir(strm_t *pThis, uchar *pszDir, size_t iLenDir)
ASSERT(pThis != NULL);
ASSERT(pszDir != NULL);
-dbgprintf("XXX: strm setDir: '%s'\n", pszDir);
if(iLenDir < 1)
ABORT_FINALIZE(RS_RET_FILE_PREFIX_MISSING);
@@ -1046,7 +1029,6 @@ CODESTARTobjQueryInterface(strm)
pIf->RecordBegin = strmRecordBegin;
pIf->RecordEnd = strmRecordEnd;
pIf->Serialize = strmSerialize;
- /* TODO: remove this! */ pIf->SetiAddtlOpenFlags = strmSetiAddtlOpenFlags;
pIf->GetCurrOffset = strmGetCurrOffset;
pIf->SetWCntr = strmSetWCntr;
/* set methods */
@@ -1058,6 +1040,7 @@ CODESTARTobjQueryInterface(strm)
pIf->SettOpenMode = strmSettOpenMode;
pIf->SetsType = strmSetsType;
pIf->SetiZipLevel = strmSetiZipLevel;
+ pIf->SetsIOBufSize = strmSetsIOBufSize;
finalize_it:
ENDobjQueryInterface(strm)