diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-11-05 17:04:30 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-11-05 17:04:30 +0100 |
commit | 704bb9fc2165688ec23f9c7f1fe2776d2c2efa21 (patch) | |
tree | 806e16cf6372e402f2b4b09b41cc808158b979af /runtime/obj.c | |
parent | 6a61b91815b7be2320daa86b4392fda39aeb7be5 (diff) | |
download | rsyslog-704bb9fc2165688ec23f9c7f1fe2776d2c2efa21.tar.gz rsyslog-704bb9fc2165688ec23f9c7f1fe2776d2c2efa21.tar.bz2 rsyslog-704bb9fc2165688ec23f9c7f1fe2776d2c2efa21.zip |
queue: mini-improvement in deserializer (stage work)
Diffstat (limited to 'runtime/obj.c')
-rw-r--r-- | runtime/obj.c | 4 |
1 files changed, 2 insertions, 2 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)); |