summaryrefslogtreecommitdiffstats
path: root/queue.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-01-10 13:09:43 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-01-10 13:09:43 +0000
commitfa859275c66afc639cd3d2ea8a74cfdc63be8b99 (patch)
tree81d3e957f53a7a8d5b4d973d693a026ae5d087ad /queue.c
parent8a861afefac51ab495e5ba7946fe4fd986f0dd3c (diff)
downloadrsyslog-fa859275c66afc639cd3d2ea8a74cfdc63be8b99.tar.gz
rsyslog-fa859275c66afc639cd3d2ea8a74cfdc63be8b99.tar.xz
rsyslog-fa859275c66afc639cd3d2ea8a74cfdc63be8b99.zip
- added write functions for several types to stream class
- changed objSerialize methods to work directly on the stream class
Diffstat (limited to 'queue.c')
-rw-r--r--queue.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/queue.c b/queue.c
index 6ff4358f..a716c725 100644
--- a/queue.c
+++ b/queue.c
@@ -238,15 +238,16 @@ static rsRetVal qDestructDisk(queue_t *pThis)
static rsRetVal qAddDisk(queue_t *pThis, void* pUsr)
{
DEFiRet;
- rsCStrObj *pCStr;
assert(pThis != NULL);
- //CHKiRet(strmOpenFile(pThis->tVars.disk.pWrite, O_RDWR|O_CREAT|O_TRUNC, 0600)); // TODO: open modes!
-
+ CHKiRet((objSerialize(pUsr))(pUsr, pThis->tVars.disk.pWrite));
+ CHKiRet(strmFlush(pThis->tVars.disk.pWrite));
+#if 0
+ //rsCStrObj *pCStr;
CHKiRet((objSerialize(pUsr))(pUsr, &pCStr));
CHKiRet(strmWrite(pThis->tVars.disk.pWrite, rsCStrGetBufBeg(pCStr), rsCStrLen(pCStr)));
- CHKiRet(strmFlush(pThis->tVars.disk.pWrite));
+#endif
finalize_it:
return iRet;