openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/rsyslog/8.1903.0-r0/rsyslog-8.1903.0/runtime/obj.c
static rsRetVal objDeserializeProperties(obj_t* pObj,
                                         rsRetVal (*objSetProperty)(),
                                         strm_t* pStrm)
{
    DEFiRet;
    var_t* pVar = NULL;

    ISOBJ_assert(pObj);
    ISOBJ_TYPE_assert(pStrm, strm);

    CHKiRet(var.Construct(&pVar));
    CHKiRet(var.ConstructFinalize(pVar));

    iRet = objDeserializeProperty(pVar, pStrm);
    while (iRet == RS_RET_OK)
    {
        CHKiRet(objSetProperty(pObj, pVar));
        /* re-init var object - TODO: method of var! */
        rsCStrDestruct(&pVar->pcsName); /* no longer needed */
        if (pVar->varType == VARTYPE_STR)
        {
            if (pVar->val.pStr != NULL)
                rsCStrDestruct(&pVar->val.pStr);
        }
        iRet = objDeserializeProperty(pVar, pStrm);
    }

    if (iRet != RS_RET_NO_PROPLINE)
        FINALIZE;

    CHKiRet(objDeserializeTrailer(pStrm)); /* do trailer checks */
finalize_it:
    if (pVar != NULL)
        var.Destruct(&pVar);

    RETiRet;
}
/* De-serialize the properties of an object. This includes processing
 * of the trailer. Header must already have been processed.
 * rgerhards, 2008-01-11
 */
De-serialize the properties of an object. This includes processing
of the trailer. Header must already have been processed.
De - serialize the properties of an object . This includes processing of the trailer . Header must already have been processed .
static rsRetVal objDeserializeProperties(obj_t* pObj,
                                         rsRetVal (*objSetProperty)(),
                                         strm_t* pStrm)
{
    DEFiRet;
    var_t* pVar = NULL;
    ISOBJ_assert(pObj);
    ISOBJ_TYPE_assert(pStrm, strm);
    CHKiRet(var.Construct(&pVar));
    CHKiRet(var.ConstructFinalize(pVar));
    iRet = objDeserializeProperty(pVar, pStrm);
    while (iRet == RS_RET_OK)
    {
        CHKiRet(objSetProperty(pObj, pVar));
        rsCStrDestruct(&pVar->pcsName); 
        if (pVar->varType == VARTYPE_STR)
        {
            if (pVar->val.pStr != NULL)
                rsCStrDestruct(&pVar->val.pStr);
        }
        iRet = objDeserializeProperty(pVar, pStrm);
    }
    if (iRet != RS_RET_NO_PROPLINE)
        FINALIZE;
    CHKiRet(objDeserializeTrailer(pStrm)); 
finalize_it:
    if (pVar != NULL)
        var.Destruct(&pVar);
    RETiRet;
}
static rsRetVal objDeserializeProperties ( obj_t * pObj , rsRetVal ( * objSetProperty ) ( ) , strm_t * pStrm ) { DEFiRet ; var_t * pVar = NULL ; ISOBJ_assert ( pObj ) ; ISOBJ_TYPE_assert ( pStrm , strm ) ; CHKiRet ( var . Construct ( & pVar ) ) ; CHKiRet ( var . ConstructFinalize ( pVar ) ) ; iRet = objDeserializeProperty ( pVar , pStrm ) ; while ( iRet == RS_RET_OK ) { CHKiRet ( objSetProperty ( pObj , pVar ) ) ; rsCStrDestruct ( & pVar -> pcsName ) ; if ( pVar -> varType == VARTYPE_STR ) { if ( pVar -> val . pStr != NULL ) rsCStrDestruct ( & pVar -> val . pStr ) ; } iRet = objDeserializeProperty ( pVar , pStrm ) ; } if ( iRet != RS_RET_NO_PROPLINE ) FINALIZE ; CHKiRet ( objDeserializeTrailer ( pStrm ) ) ; finalize_it : if ( pVar != NULL ) var . Destruct ( & pVar ) ; RETiRet ; }
De-serialize the properties of an object.
De - serialize the properties of an object .
/* re-init var object - TODO: method of var! */ /* no longer needed */ /* do trailer checks */