diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-06 17:59:40 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-06 17:59:40 +0000 |
commit | 2c81480d28e7380939d43da2e8592dc257379822 (patch) | |
tree | 67291dc3e9097830859450045033470943fd6e3e /queue.c | |
parent | 22ea87ec597245df9216aa6a6b9da2a379ca1a40 (diff) | |
download | rsyslog-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.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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: |