summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--runtime/obj.c4
-rw-r--r--runtime/obj.h2
-rw-r--r--runtime/queue.c4
3 files changed, 5 insertions, 5 deletions
diff --git a/runtime/obj.c b/runtime/obj.c
index cf4ef50d..b100a522 100644
--- a/runtime/obj.c
+++ b/runtime/obj.c
@@ -877,7 +877,7 @@ finalize_it:
* rgerhards, 2012-11-03
*/
rsRetVal
-objDeserializeWithMethods(void *ppObj, uchar *pszTypeExpected, strm_t *pStrm, rsRetVal (*fFixup)(obj_t*,void*), void *pUsr, rsRetVal (*objConstruct)(), rsRetVal (*objConstructFinalize)(), rsRetVal (*objSetProperty)())
+objDeserializeWithMethods(void *ppObj, uchar *pszTypeExpected, int lenTypeExpected, strm_t *pStrm, rsRetVal (*fFixup)(obj_t*,void*), void *pUsr, rsRetVal (*objConstruct)(), rsRetVal (*objConstructFinalize)(), rsRetVal (*objSetProperty)())
{
DEFiRet;
rsRetVal iRetLocal;
@@ -904,7 +904,7 @@ objDeserializeWithMethods(void *ppObj, uchar *pszTypeExpected, strm_t *pStrm, rs
}
} while(iRetLocal != RS_RET_OK);
- if(rsCStrSzStrCmp(pstrID, pszTypeExpected, ustrlen(pszTypeExpected))) /* TODO: optimize strlen() - caller shall provide */
+ if(rsCStrSzStrCmp(pstrID, pszTypeExpected, lenTypeExpected))
ABORT_FINALIZE(RS_RET_INVALID_OID);
CHKiRet(objConstruct(&pObj));
diff --git a/runtime/obj.h b/runtime/obj.h
index a93befa3..72f806da 100644
--- a/runtime/obj.h
+++ b/runtime/obj.h
@@ -118,7 +118,7 @@ ENDinterface(obj)
rsRetVal objGetObjInterface(obj_if_t *pIf);
PROTOTYPEObjClassInit(obj);
PROTOTYPEObjClassExit(obj);
-rsRetVal objDeserializeWithMethods(void *ppObj, uchar *pszTypeExpected, strm_t *pStrm, rsRetVal (*fFixup)(obj_t*,void*), void *pUsr, rsRetVal (*objConstruct)(), rsRetVal (*objConstructFinalize)(), rsRetVal (*objSetProperty)());
+rsRetVal objDeserializeWithMethods(void *ppObj, uchar *pszTypeExpected, int lenTypeExpected, strm_t *pStrm, rsRetVal (*fFixup)(obj_t*,void*), void *pUsr, rsRetVal (*objConstruct)(), rsRetVal (*objConstructFinalize)(), rsRetVal (*objSetProperty)());
/* the following definition is only for "friends" */
diff --git a/runtime/queue.c b/runtime/queue.c
index 306b88ed..9113ccb5 100644
--- a/runtime/queue.c
+++ b/runtime/queue.c
@@ -921,7 +921,7 @@ finalize_it:
static rsRetVal qDeqDisk(qqueue_t *pThis, msg_t **ppMsg)
{
DEFiRet;
- iRet = objDeserializeWithMethods(ppMsg, (uchar*) "msg", pThis->tVars.disk.pReadDeq, NULL,
+ iRet = objDeserializeWithMethods(ppMsg, (uchar*) "msg", 3, pThis->tVars.disk.pReadDeq, NULL,
NULL, msgConstructForDeserializer, msgConstructFinalizer, MsgSetProperty);
RETiRet;
}
@@ -947,7 +947,7 @@ static rsRetVal qDelDisk(qqueue_t *pThis)
int64 offsOut;
CHKiRet(strm.GetCurrOffset(pThis->tVars.disk.pReadDel, &offsIn));
- CHKiRet(objDeserializeWithMethods(&pDummyObj, (uchar*) "msg", pThis->tVars.disk.pReadDel,
+ CHKiRet(objDeserializeWithMethods(&pDummyObj, (uchar*) "msg", 3, pThis->tVars.disk.pReadDel,
NULL, NULL, qDelDiskCallbackDummy, qDelDiskCallbackDummy, qDelDiskCallbackDummy));
CHKiRet(strm.GetCurrOffset(pThis->tVars.disk.pReadDel, &offsOut));