From fa859275c66afc639cd3d2ea8a74cfdc63be8b99 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 10 Jan 2008 13:09:43 +0000 Subject: - added write functions for several types to stream class - changed objSerialize methods to work directly on the stream class --- queue.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'queue.c') 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; -- cgit v1.2.3