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/tools/rsyslogd.c
rsRetVal submitMsg2(smsg_t* pMsg)
{
    qqueue_t* pQueue;
    ruleset_t* pRuleset;
    DEFiRet;

    ISOBJ_TYPE_assert(pMsg, msg);

    if (getRawMsgLen(pMsg) > glblGetMaxLine())
    {
        uchar* rawmsg;
        int dummy;
        getRawMsg(pMsg, &rawmsg, &dummy);
        if (glblReportOversizeMessage())
        {
            LogMsg(0, RS_RET_OVERSIZE_MSG, LOG_WARNING,
                   "message too long (%d) with configured size %d, begin of "
                   "message is: %.80s",
                   getRawMsgLen(pMsg), glblGetMaxLine(), rawmsg);
        }
        writeOversizeMessageLog(pMsg);
        if (glblGetOversizeMsgInputMode() == glblOversizeMsgInputMode_Split)
        {
            splitOversizeMessage(pMsg);
            /* we have submitted the message segments recursively, so we
             * can just deleted the original msg object and terminate.
             */
            msgDestruct(&pMsg);
            FINALIZE;
        }
        else if (glblGetOversizeMsgInputMode() ==
                 glblOversizeMsgInputMode_Truncate)
        {
            MsgTruncateToMaxSize(pMsg);
        }
        else
        {
            /* in "accept" mode, we do nothing, simply because "accept" means
             * to use as-is.
             */
            assert(glblGetOversizeMsgInputMode() ==
                   glblOversizeMsgInputMode_Accept);
        }
    }

    pRuleset = MsgGetRuleset(pMsg);
    pQueue = (pRuleset == NULL) ? pMsgQueue : ruleset.GetRulesetQueue(pRuleset);

    /* if a plugin logs a message during shutdown, the queue may no longer exist
     */
    if (pQueue == NULL)
    {
        DBGPRINTF("submitMsg2() could not submit message - "
                  "queue does (no longer?) exist - ignored\n");
        FINALIZE;
    }

    qqueueEnqMsg(pQueue, pMsg->flowCtlType, pMsg);

finalize_it:
    RETiRet;
}
/* submit a message to the main message queue.   This is primarily
 * a hook to prevent the need for callers to know about the main message queue
 * rgerhards, 2008-02-13
 */
submit a message to the main message queue.   This is primarily
a hook to prevent the need for callers to know about the main message queue
rgerhards, 2008-02-13
submit a message to the main message queue . This is primarily a hook to prevent the need for callers to know about the main message queue rgerhards 2008 - 02 - 13
rsRetVal submitMsg2(smsg_t* pMsg)
{
    qqueue_t* pQueue;
    ruleset_t* pRuleset;
    DEFiRet;
    ISOBJ_TYPE_assert(pMsg, msg);
    if (getRawMsgLen(pMsg) > glblGetMaxLine())
    {
        uchar* rawmsg;
        int dummy;
        getRawMsg(pMsg, &rawmsg, &dummy);
        if (glblReportOversizeMessage())
        {
            LogMsg(0, RS_RET_OVERSIZE_MSG, LOG_WARNING,
                   "message too long (%d) with configured size %d, begin of "
                   "message is: %.80s",
                   getRawMsgLen(pMsg), glblGetMaxLine(), rawmsg);
        }
        writeOversizeMessageLog(pMsg);
        if (glblGetOversizeMsgInputMode() == glblOversizeMsgInputMode_Split)
        {
            splitOversizeMessage(pMsg);
            msgDestruct(&pMsg);
            FINALIZE;
        }
        else if (glblGetOversizeMsgInputMode() ==
                 glblOversizeMsgInputMode_Truncate)
        {
            MsgTruncateToMaxSize(pMsg);
        }
        else
        {
            assert(glblGetOversizeMsgInputMode() ==
                   glblOversizeMsgInputMode_Accept);
        }
    }
    pRuleset = MsgGetRuleset(pMsg);
    pQueue = (pRuleset == NULL) ? pMsgQueue : ruleset.GetRulesetQueue(pRuleset);
    if (pQueue == NULL)
    {
        DBGPRINTF("submitMsg2() could not submit message - "
                  "queue does (no longer?) exist - ignored\n");
        FINALIZE;
    }
    qqueueEnqMsg(pQueue, pMsg->flowCtlType, pMsg);
finalize_it:
    RETiRet;
}
rsRetVal submitMsg2 ( smsg_t * pMsg ) { qqueue_t * pQueue ; ruleset_t * pRuleset ; DEFiRet ; ISOBJ_TYPE_assert ( pMsg , msg ) ; if ( getRawMsgLen ( pMsg ) > glblGetMaxLine ( ) ) { uchar * rawmsg ; int dummy ; getRawMsg ( pMsg , & rawmsg , & dummy ) ; if ( glblReportOversizeMessage ( ) ) { LogMsg ( 0 , RS_RET_OVERSIZE_MSG , LOG_WARNING , " " " " , getRawMsgLen ( pMsg ) , glblGetMaxLine ( ) , rawmsg ) ; } writeOversizeMessageLog ( pMsg ) ; if ( glblGetOversizeMsgInputMode ( ) == glblOversizeMsgInputMode_Split ) { splitOversizeMessage ( pMsg ) ; msgDestruct ( & pMsg ) ; FINALIZE ; } else if ( glblGetOversizeMsgInputMode ( ) == glblOversizeMsgInputMode_Truncate ) { MsgTruncateToMaxSize ( pMsg ) ; } else { assert ( glblGetOversizeMsgInputMode ( ) == glblOversizeMsgInputMode_Accept ) ; } } pRuleset = MsgGetRuleset ( pMsg ) ; pQueue = ( pRuleset == NULL ) ? pMsgQueue : ruleset . GetRulesetQueue ( pRuleset ) ; if ( pQueue == NULL ) { DBGPRINTF ( " " " \n " ) ; FINALIZE ; } qqueueEnqMsg ( pQueue , pMsg -> flowCtlType , pMsg ) ; finalize_it : RETiRet ; }
submit a message to the main message queue.
submit a message to the main message queue .
/* we have submitted the message segments recursively, so we
             * can just deleted the original msg object and terminate.
             */ /* in "accept" mode, we do nothing, simply because "accept" means
             * to use as-is.
             */ /* if a plugin logs a message during shutdown, the queue may no longer exist
     */