summaryrefslogtreecommitdiffstats
path: root/omfile.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-07-26 12:47:09 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-07-26 12:47:09 +0000
commit6e2c5057684a191c565220e6e41e561305b3a6ba (patch)
tree59ebc9ca6e9952db513c9f65bc39a2a4c5ff239e /omfile.c
parent54669873b0469aa69a4c9f88bcf88470218082f8 (diff)
downloadrsyslog-6e2c5057684a191c565220e6e41e561305b3a6ba.tar.gz
rsyslog-6e2c5057684a191c565220e6e41e561305b3a6ba.tar.xz
rsyslog-6e2c5057684a191c565220e6e41e561305b3a6ba.zip
- changed doAction() interface to contain the full message string
- f_iov and its handling has been removed
Diffstat (limited to 'omfile.c')
-rw-r--r--omfile.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/omfile.c b/omfile.c
index 9fbc44cd..ebbc85d3 100644
--- a/omfile.c
+++ b/omfile.c
@@ -467,7 +467,7 @@ static int prepareDynFile(selector_t *f, instanceData *pData)
* will be called for all outputs using file semantics,
* for example also for pipes.
*/
-static rsRetVal writeFile(selector_t *f, instanceData *pData)
+static rsRetVal writeFile(selector_t *f, uchar *pMsg, instanceData *pData)
{
off_t actualFileSize;
rsRetVal iRet = RS_RET_OK;
@@ -484,7 +484,6 @@ static rsRetVal writeFile(selector_t *f, instanceData *pData)
}
/* create the message based on format specified */
- iovCreate(f);
again:
/* check if we have a file size limit and, if so,
* obey to it.
@@ -517,7 +516,7 @@ again:
}
}
- if (writev(pData->fd, f->f_iov, f->f_iIovUsed) < 0) {
+ if (write(pData->fd, pMsg, strlen((char*)pMsg)) < 0) {
int e = errno;
/* If a named pipe is full, just ignore it for now
@@ -599,7 +598,7 @@ CODESTARTdoAction
* all others are doomed.
*/
if(pData->bDynamicName || (pData->fd != -1))
- iRet = writeFile(f, pData);
+ iRet = writeFile(f, pMsg, pData);
ENDdoAction