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/stream.c
static rsRetVal strmSerialize(strm_t* pThis, strm_t* pStrm)
{
    DEFiRet;
    int i;
    int64 l;

    ISOBJ_TYPE_assert(pThis, strm);
    ISOBJ_TYPE_assert(pStrm, strm);

    strmFlushInternal(pThis, 0);
    CHKiRet(obj.BeginSerialize(pStrm, (obj_t*)pThis));

    objSerializeSCALAR(pStrm, iCurrFNum,
                       INT); /* implicit cast is OK for persistance */
    objSerializePTR(pStrm, pszFName, PSZ);
    objSerializeSCALAR(pStrm, iMaxFiles, INT);
    objSerializeSCALAR(pStrm, bDeleteOnClose, INT);

    i = pThis->sType;
    objSerializeSCALAR_VAR(pStrm, sType, INT, i);

    i = pThis->tOperationsMode;
    objSerializeSCALAR_VAR(pStrm, tOperationsMode, INT, i);

    i = pThis->tOpenMode;
    objSerializeSCALAR_VAR(pStrm, tOpenMode, INT, i);

    l = pThis->iCurrOffs;
    objSerializeSCALAR_VAR(pStrm, iCurrOffs, INT64, l);

    l = pThis->inode;
    objSerializeSCALAR_VAR(pStrm, inode, INT64, l);

    l = pThis->strtOffs;
    objSerializeSCALAR_VAR(pStrm, strtOffs, INT64, l);

    dbgprintf("strmSerialize: pThis->prevLineSegment %p\n",
              pThis->prevLineSegment);
    if (pThis->prevLineSegment != NULL)
    {
        cstrFinalize(pThis->prevLineSegment);
        objSerializePTR(pStrm, prevLineSegment, CSTR);
    }

    if (pThis->prevMsgSegment != NULL)
    {
        cstrFinalize(pThis->prevMsgSegment);
        objSerializePTR(pStrm, prevMsgSegment, CSTR);
    }

    i = pThis->bPrevWasNL;
    objSerializeSCALAR_VAR(pStrm, bPrevWasNL, INT, i);

    CHKiRet(obj.EndSerialize(pStrm));

finalize_it:
    RETiRet;
}
/* This method serializes a stream object. That means the whole
 * object is modified into text form. That text form is suitable for
 * later reconstruction of the object.
 * The most common use case for this method is the creation of an
 * on-disk representation of the message object.
 * We do not serialize the dynamic properties.
 * rgerhards, 2008-01-10
 */
This method serializes a stream object. That means the whole
object is modified into text form. That text form is suitable for
later reconstruction of the object.
The most common use case for this method is the creation of an
on-disk representation of the message object.
We do not serialize the dynamic properties.
This method serializes a stream object . That means the whole object is modified into text form . That text form is suitable for later reconstruction of the object . The most common use case for this method is the creation of an on - disk representation of the message object . We do not serialize the dynamic properties .
static rsRetVal strmSerialize(strm_t* pThis, strm_t* pStrm)
{
    DEFiRet;
    int i;
    int64 l;
    ISOBJ_TYPE_assert(pThis, strm);
    ISOBJ_TYPE_assert(pStrm, strm);
    strmFlushInternal(pThis, 0);
    CHKiRet(obj.BeginSerialize(pStrm, (obj_t*)pThis));
    objSerializeSCALAR(pStrm, iCurrFNum,
                       INT); 
    objSerializePTR(pStrm, pszFName, PSZ);
    objSerializeSCALAR(pStrm, iMaxFiles, INT);
    objSerializeSCALAR(pStrm, bDeleteOnClose, INT);
    i = pThis->sType;
    objSerializeSCALAR_VAR(pStrm, sType, INT, i);
    i = pThis->tOperationsMode;
    objSerializeSCALAR_VAR(pStrm, tOperationsMode, INT, i);
    i = pThis->tOpenMode;
    objSerializeSCALAR_VAR(pStrm, tOpenMode, INT, i);
    l = pThis->iCurrOffs;
    objSerializeSCALAR_VAR(pStrm, iCurrOffs, INT64, l);
    l = pThis->inode;
    objSerializeSCALAR_VAR(pStrm, inode, INT64, l);
    l = pThis->strtOffs;
    objSerializeSCALAR_VAR(pStrm, strtOffs, INT64, l);
    dbgprintf("strmSerialize: pThis->prevLineSegment %p\n",
              pThis->prevLineSegment);
    if (pThis->prevLineSegment != NULL)
    {
        cstrFinalize(pThis->prevLineSegment);
        objSerializePTR(pStrm, prevLineSegment, CSTR);
    }
    if (pThis->prevMsgSegment != NULL)
    {
        cstrFinalize(pThis->prevMsgSegment);
        objSerializePTR(pStrm, prevMsgSegment, CSTR);
    }
    i = pThis->bPrevWasNL;
    objSerializeSCALAR_VAR(pStrm, bPrevWasNL, INT, i);
    CHKiRet(obj.EndSerialize(pStrm));
finalize_it:
    RETiRet;
}
static rsRetVal strmSerialize ( strm_t * pThis , strm_t * pStrm ) { DEFiRet ; int i ; int64 l ; ISOBJ_TYPE_assert ( pThis , strm ) ; ISOBJ_TYPE_assert ( pStrm , strm ) ; strmFlushInternal ( pThis , 0 ) ; CHKiRet ( obj . BeginSerialize ( pStrm , ( obj_t * ) pThis ) ) ; objSerializeSCALAR ( pStrm , iCurrFNum , INT ) ; objSerializePTR ( pStrm , pszFName , PSZ ) ; objSerializeSCALAR ( pStrm , iMaxFiles , INT ) ; objSerializeSCALAR ( pStrm , bDeleteOnClose , INT ) ; i = pThis -> sType ; objSerializeSCALAR_VAR ( pStrm , sType , INT , i ) ; i = pThis -> tOperationsMode ; objSerializeSCALAR_VAR ( pStrm , tOperationsMode , INT , i ) ; i = pThis -> tOpenMode ; objSerializeSCALAR_VAR ( pStrm , tOpenMode , INT , i ) ; l = pThis -> iCurrOffs ; objSerializeSCALAR_VAR ( pStrm , iCurrOffs , INT64 , l ) ; l = pThis -> inode ; objSerializeSCALAR_VAR ( pStrm , inode , INT64 , l ) ; l = pThis -> strtOffs ; objSerializeSCALAR_VAR ( pStrm , strtOffs , INT64 , l ) ; dbgprintf ( " \n " , pThis -> prevLineSegment ) ; if ( pThis -> prevLineSegment != NULL ) { cstrFinalize ( pThis -> prevLineSegment ) ; objSerializePTR ( pStrm , prevLineSegment , CSTR ) ; } if ( pThis -> prevMsgSegment != NULL ) { cstrFinalize ( pThis -> prevMsgSegment ) ; objSerializePTR ( pStrm , prevMsgSegment , CSTR ) ; } i = pThis -> bPrevWasNL ; objSerializeSCALAR_VAR ( pStrm , bPrevWasNL , INT , i ) ; CHKiRet ( obj . EndSerialize ( pStrm ) ) ; finalize_it : RETiRet ; }
This method serializes a stream object.
This method serializes a stream object .
/* implicit cast is OK for persistance */