summaryrefslogtreecommitdiffstats
path: root/queue.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-01-06 17:59:40 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-01-06 17:59:40 +0000
commit2c81480d28e7380939d43da2e8592dc257379822 (patch)
tree67291dc3e9097830859450045033470943fd6e3e /queue.c
parent22ea87ec597245df9216aa6a6b9da2a379ca1a40 (diff)
downloadrsyslog-2c81480d28e7380939d43da2e8592dc257379822.tar.gz
rsyslog-2c81480d28e7380939d43da2e8592dc257379822.tar.xz
rsyslog-2c81480d28e7380939d43da2e8592dc257379822.zip
worked on object header (now also contains the size)
Diffstat (limited to 'queue.c')
-rw-r--r--queue.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/queue.c b/queue.c
index ffd007e2..17e33675 100644
--- a/queue.c
+++ b/queue.c
@@ -40,6 +40,7 @@
#include "rsyslog.h"
#include "syslogd.h"
#include "queue.h"
+#include "stringbuf.h"
#include "srUtils.h"
/* static data */
@@ -233,13 +234,12 @@ rsRetVal qAddDisk(queue_t *pThis, void* pUsr)
{
DEFiRet;
int i;
- long lenBuf;
- uchar *pBuf;
+ rsCStrObj *pCStr;
assert(pThis != NULL);
dbgprintf("writing to file %d\n", pThis->tVars.disk.fd);
- CHKiRet((objSerialize(pUsr))(pUsr, &pBuf, &lenBuf)); // TODO: hier weiter machen!
- i = write(pThis->tVars.disk.fd, pBuf, strlen((char*) pBuf));
+ CHKiRet((objSerialize(pUsr))(pUsr, &pCStr)); // TODO: hier weiter machen!
+ i = write(pThis->tVars.disk.fd, rsCStrGetBufBeg(pCStr), rsCStrLen(pCStr));
dbgprintf("write wrote %d bytes, errno: %d, err %s\n", i, errno, strerror(errno));
finalize_it: