diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-11 14:12:25 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-11 14:12:25 +0000 |
commit | 8dad3997505f71e6e9962892f79d7b7dad0a89ce (patch) | |
tree | ce49da850c9d4deaf6143ef2232766e8c1ccdd35 /obj.c | |
parent | e095d1ab45b205b4849151b15592c2824f04373a (diff) | |
download | rsyslog-8dad3997505f71e6e9962892f79d7b7dad0a89ce.tar.gz rsyslog-8dad3997505f71e6e9962892f79d7b7dad0a89ce.tar.xz rsyslog-8dad3997505f71e6e9962892f79d7b7dad0a89ce.zip |
file stream objects are now persistet on immediate queue shutdown (queue
itself is not yet fully persisted)
Diffstat (limited to 'obj.c')
-rw-r--r-- | obj.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -125,7 +125,7 @@ static rsRetVal objSerializeHeader(strm_t *pStrm, obj_t *pObj) DEFiRet; assert(pStrm != NULL); - assert(pObj != NULL); + ISOBJ_assert(pObj); /* object cookie and serializer version (so far always 1) */ CHKiRet(strmWriteChar(pStrm, COOKIE_OBJLINE)); @@ -186,6 +186,7 @@ rsRetVal objSerializeProp(strm_t *pStrm, uchar *pszPropName, propertyType_t prop assert(pStrm != NULL); assert(pszPropName != NULL); + dbgprintf("objSerializeProp: strm %p, propName '%s', type %d, pUsr %p\n", pStrm, pszPropName, propType, pUsr); /* if we have no user pointer, there is no need to write this property. * TODO: think if that's the righ point of view * rgerhards, 2008-01-06 @@ -194,6 +195,8 @@ rsRetVal objSerializeProp(strm_t *pStrm, uchar *pszPropName, propertyType_t prop ABORT_FINALIZE(RS_RET_OK); } + /* TODO: use the stream functions for data conversion here - should be quicker */ + switch(propType) { case PROPTYPE_PSZ: pszBuf = (uchar*) pUsr; @@ -413,7 +416,6 @@ static rsRetVal objDeserializeHeader(objID_t *poID, int* poVers, strm_t *pStrm) *poVers = oVers; finalize_it: -dbgprintf("DeserializeHeader oid: %ld, vers: %ld, iRet: %d\n", ioID, oVers, iRet); return iRet; } @@ -632,7 +634,7 @@ rsRetVal objRegisterObj(objID_t oID, objInfo_t *pInfo) assert(pInfo != NULL); if(oID < 1 || oID > OBJ_NUM_IDS) ABORT_FINALIZE(RS_RET_INVALID_OID); - + arrObjInfo[oID] = pInfo; finalize_it: |