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/conf.c
rsRetVal cflineDoAction(rsconf_t* conf, uchar** p, action_t** ppAction)
{
    modInfo_t* pMod;
    cfgmodules_etry_t* node;
    omodStringRequest_t* pOMSR;
    int bHadWarning = 0;
    action_t* pAction = NULL;
    void* pModData;
    DEFiRet;

    assert(p != NULL);
    assert(ppAction != NULL);

    /* loop through all modules and see if one picks up the line */
    node = module.GetNxtCnfType(conf, NULL, eMOD_OUT);
    /* Note: clang static analyzer reports that node maybe == NULL. However,
     * this is not possible, because we have the built-in output modules which
     * are always present. Anyhow, we guard this by an assert. -- rgerhards,
     * 2010-12-16
     */
    assert(node != NULL);
    while (node != NULL)
    {
        pOMSR = NULL;
        pMod = node->pMod;
        iRet = pMod->mod.om.parseSelectorAct(p, &pModData, &pOMSR);
        dbgprintf("tried selector action for %s: %d\n", module.GetName(pMod),
                  iRet);
        if (iRet == RS_RET_OK_WARN)
        {
            bHadWarning = 1;
            iRet = RS_RET_OK;
        }
        if (iRet == RS_RET_OK)
        {
            if ((iRet = addAction(&pAction, pMod, pModData, pOMSR, NULL,
                                  NULL)) == RS_RET_OK)
            {
                /* here check if the module is compatible with select features
                 * (currently, we have no such features!) */
                conf->actions.nbrActions++; /* one more active action! */
            }
            break;
        }
        else if (iRet != RS_RET_CONFLINE_UNPROCESSED)
        {
            /* In this case, the module would have handled the config
             * line, but some error occured while doing so. This error should
             * already by reported by the module. We do not try any other
             * modules on this line, because we found the right one.
             * rgerhards, 2007-07-24
             */
            dbgprintf("error %d parsing config line\n", (int)iRet);
            break;
        }
        node = module.GetNxtCnfType(conf, node, eMOD_OUT);
    }

    *ppAction = pAction;
    if (iRet == RS_RET_OK && bHadWarning)
        iRet = RS_RET_OK_WARN;
    RETiRet;
}
/* process the action part of a selector line
 * rgerhards, 2007-08-01
 */
process the action part of a selector line
rgerhards, 2007-08-01
process the action part of a selector line rgerhards 2007 - 08 - 01
rsRetVal cflineDoAction(rsconf_t* conf, uchar** p, action_t** ppAction)
{
    modInfo_t* pMod;
    cfgmodules_etry_t* node;
    omodStringRequest_t* pOMSR;
    int bHadWarning = 0;
    action_t* pAction = NULL;
    void* pModData;
    DEFiRet;
    assert(p != NULL);
    assert(ppAction != NULL);
    node = module.GetNxtCnfType(conf, NULL, eMOD_OUT);
    assert(node != NULL);
    while (node != NULL)
    {
        pOMSR = NULL;
        pMod = node->pMod;
        iRet = pMod->mod.om.parseSelectorAct(p, &pModData, &pOMSR);
        dbgprintf("tried selector action for %s: %d\n", module.GetName(pMod),
                  iRet);
        if (iRet == RS_RET_OK_WARN)
        {
            bHadWarning = 1;
            iRet = RS_RET_OK;
        }
        if (iRet == RS_RET_OK)
        {
            if ((iRet = addAction(&pAction, pMod, pModData, pOMSR, NULL,
                                  NULL)) == RS_RET_OK)
            {
                conf->actions.nbrActions++; 
            }
            break;
        }
        else if (iRet != RS_RET_CONFLINE_UNPROCESSED)
        {
            dbgprintf("error %d parsing config line\n", (int)iRet);
            break;
        }
        node = module.GetNxtCnfType(conf, node, eMOD_OUT);
    }
    *ppAction = pAction;
    if (iRet == RS_RET_OK && bHadWarning)
        iRet = RS_RET_OK_WARN;
    RETiRet;
}
rsRetVal cflineDoAction ( rsconf_t * conf , uchar * * p , action_t * * ppAction ) { modInfo_t * pMod ; cfgmodules_etry_t * node ; omodStringRequest_t * pOMSR ; int bHadWarning = 0 ; action_t * pAction = NULL ; void * pModData ; DEFiRet ; assert ( p != NULL ) ; assert ( ppAction != NULL ) ; node = module . GetNxtCnfType ( conf , NULL , eMOD_OUT ) ; assert ( node != NULL ) ; while ( node != NULL ) { pOMSR = NULL ; pMod = node -> pMod ; iRet = pMod -> mod . om . parseSelectorAct ( p , & pModData , & pOMSR ) ; dbgprintf ( " \n " , module . GetName ( pMod ) , iRet ) ; if ( iRet == RS_RET_OK_WARN ) { bHadWarning = 1 ; iRet = RS_RET_OK ; } if ( iRet == RS_RET_OK ) { if ( ( iRet = addAction ( & pAction , pMod , pModData , pOMSR , NULL , NULL ) ) == RS_RET_OK ) { conf -> actions . nbrActions ++ ; } break ; } else if ( iRet != RS_RET_CONFLINE_UNPROCESSED ) { dbgprintf ( " \n " , ( int ) iRet ) ; break ; } node = module . GetNxtCnfType ( conf , node , eMOD_OUT ) ; } * ppAction = pAction ; if ( iRet == RS_RET_OK && bHadWarning ) iRet = RS_RET_OK_WARN ; RETiRet ; }
process the action part of a selector line
 rgerhards, 2007-08-01
process the action part of a selector line rgerhards 2007 - 08 - 01
/* loop through all modules and see if one picks up the line */ /* Note: clang static analyzer reports that node maybe == NULL. However,
     * this is not possible, because we have the built-in output modules which
     * are always present. Anyhow, we guard this by an assert. -- rgerhards,
     * 2010-12-16
     */ /* here check if the module is compatible with select features
                 * (currently, we have no such features!) */ /* one more active action! */ /* In this case, the module would have handled the config
             * line, but some error occured while doing so. This error should
             * already by reported by the module. We do not try any other
             * modules on this line, because we found the right one.
             * rgerhards, 2007-07-24
             */