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
static rsRetVal doNameLine(uchar** pp, void* pVal)
{
    DEFiRet;
    uchar* p;
    enum eDirective eDir;
    char szName[128];

    assert(pp != NULL);
    p = *pp;
    assert(p != NULL);

    eDir = (enum eDirective)pVal; /* this time, it actually is NOT a pointer! */

    if (getSubString(&p, szName, sizeof(szName), ',') != 0)
    {
        LogError(0, RS_RET_NOT_FOUND,
                 "Invalid config line: could not extract name - line ignored");
        ABORT_FINALIZE(RS_RET_NOT_FOUND);
    }
    ltrim(szName);
    if (*p == ',')
        ++p; /* comma was eaten */

    /* we got the name - now we pass name & the rest of the string
     * to the subfunction. It makes no sense to do further
     * parsing here, as this is in close interaction with the
     * respective subsystem. rgerhards 2004-11-17
     */

    switch (eDir)
    {
        case DIR_TEMPLATE:
            tplAddLine(loadConf, szName, &p);
            break;
        case DIR_OUTCHANNEL:
            ochAddLine(szName, &p);
            break;
        case DIR_ALLOWEDSENDER:
            net.addAllowedSenderLine(szName, &p);
            break;
        default: /* we do this to avoid compiler warning - not all
                  * enum values call this function, so an incomplete list
                  * is quite ok (but then we should not run into this code,
                  * so at least we log a debug warning).
                  */
            dbgprintf(
                "INTERNAL ERROR: doNameLine() called with invalid eDir %d.\n",
                eDir);
            break;
    }

    *pp = p;

finalize_it:
    RETiRet;
}
/* parse and interpret a $-config line that starts with
 * a name (this is common code). It is parsed to the name
 * and then the proper sub-function is called to handle
 * the actual directive.
 * rgerhards 2004-11-17
 * rgerhards 2005-06-21: previously only for templates, now
 *    generalized.
 */
parse and interpret a $-config line that starts with
a name (this is common code). It is parsed to the name
and then the proper sub-function is called to handle
the actual directive.
rgerhards 2004-11-17
rgerhards 2005-06-21: previously only for templates, now
generalized.
parse and interpret a $ - config line that starts with a name ( this is common code ) . It is parsed to the name and then the proper sub - function is called to handle the actual directive . rgerhards 2004 - 11 - 17 rgerhards 2005 - 06 - 21 : previously only for templates now generalized .
static rsRetVal doNameLine(uchar** pp, void* pVal)
{
    DEFiRet;
    uchar* p;
    enum eDirective eDir;
    char szName[128];
    assert(pp != NULL);
    p = *pp;
    assert(p != NULL);
    eDir = (enum eDirective)pVal; 
    if (getSubString(&p, szName, sizeof(szName), ',') != 0)
    {
        LogError(0, RS_RET_NOT_FOUND,
                 "Invalid config line: could not extract name - line ignored");
        ABORT_FINALIZE(RS_RET_NOT_FOUND);
    }
    ltrim(szName);
    if (*p == ',')
        ++p; 
    switch (eDir)
    {
        case DIR_TEMPLATE:
            tplAddLine(loadConf, szName, &p);
            break;
        case DIR_OUTCHANNEL:
            ochAddLine(szName, &p);
            break;
        case DIR_ALLOWEDSENDER:
            net.addAllowedSenderLine(szName, &p);
            break;
        default: 
            dbgprintf(
                "INTERNAL ERROR: doNameLine() called with invalid eDir %d.\n",
                eDir);
            break;
    }
    *pp = p;
finalize_it:
    RETiRet;
}
static rsRetVal doNameLine ( uchar * * pp , void * pVal ) { DEFiRet ; uchar * p ; enum eDirective eDir ; char szName [ 128 ] ; assert ( pp != NULL ) ; p = * pp ; assert ( p != NULL ) ; eDir = ( enum eDirective ) pVal ; if ( getSubString ( & p , szName , sizeof ( szName ) , ' ' ) != 0 ) { LogError ( 0 , RS_RET_NOT_FOUND , " " ) ; ABORT_FINALIZE ( RS_RET_NOT_FOUND ) ; } ltrim ( szName ) ; if ( * p == ' ' ) ++ p ; switch ( eDir ) { case DIR_TEMPLATE : tplAddLine ( loadConf , szName , & p ) ; break ; case DIR_OUTCHANNEL : ochAddLine ( szName , & p ) ; break ; case DIR_ALLOWEDSENDER : net . addAllowedSenderLine ( szName , & p ) ; break ; default : dbgprintf ( " \n " , eDir ) ; break ; } * pp = p ; finalize_it : RETiRet ; }
parse and interpret a $-config line that starts with
 a name (this is common code).
parse and interpret a $ - config line that starts with a name ( this is common code ) .
/* this time, it actually is NOT a pointer! */ /* comma was eaten */ /* we got the name - now we pass name & the rest of the string
     * to the subfunction. It makes no sense to do further
     * parsing here, as this is in close interaction with the
     * respective subsystem. rgerhards 2004-11-17
     */ /* we do this to avoid compiler warning - not all
                  * enum values call this function, so an incomplete list
                  * is quite ok (but then we should not run into this code,
                  * so at least we log a debug warning).
                  */