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/plugins/imuxsock/imuxsock.c
static rsRetVal addInstance(void __attribute__((unused)) * pVal, uchar* pNewVal)
{
    instanceConf_t* inst;
    DEFiRet;

    if (pNewVal == NULL || pNewVal[0] == '\0')
    {
        LogError(0, RS_RET_SOCKNAME_MISSING,
                 "imuxsock: socket name must be specified, "
                 "but is not - listener not created\n");
        if (pNewVal != NULL)
            free(pNewVal);
        ABORT_FINALIZE(RS_RET_SOCKNAME_MISSING);
    }

    CHKiRet(createInstance(&inst));
    inst->sockName = pNewVal;
    inst->ratelimitInterval = cs.ratelimitInterval;
    inst->pLogHostName = cs.pLogHostName;
    inst->ratelimitBurst = cs.ratelimitBurst;
    inst->ratelimitSeverity = cs.ratelimitSeverity;
    inst->bUseFlowCtl = cs.bUseFlowCtl;
    inst->bIgnoreTimestamp = cs.bIgnoreTimestamp;
    inst->bCreatePath = cs.bCreatePath;
    inst->bUseSysTimeStamp = cs.bUseSysTimeStamp;
    inst->bWritePid = cs.bWritePid;
    inst->bAnnotate = cs.bAnnotate;
    inst->bParseTrusted = cs.bParseTrusted;
    inst->bParseHost = UNSET;
    inst->next = NULL;

    /* reset hostname for next socket */
    cs.pLogHostName = NULL;

finalize_it:
    RETiRet;
}
/* This function is called when a new listen socket instance shall be added to
 * the current config object via the legacy config system. It just shuffles
 * all parameters to the listener in-memory instance.
 * rgerhards, 2011-05-12
 */
This function is called when a new listen socket instance shall be added to
the current config object via the legacy config system. It just shuffles
all parameters to the listener in-memory instance.
This function is called when a new listen socket instance shall be added to the current config object via the legacy config system . It just shuffles all parameters to the listener in - memory instance .
static rsRetVal addInstance(void __attribute__((unused)) * pVal, uchar* pNewVal)
{
    instanceConf_t* inst;
    DEFiRet;
    if (pNewVal == NULL || pNewVal[0] == '\0')
    {
        LogError(0, RS_RET_SOCKNAME_MISSING,
                 "imuxsock: socket name must be specified, "
                 "but is not - listener not created\n");
        if (pNewVal != NULL)
            free(pNewVal);
        ABORT_FINALIZE(RS_RET_SOCKNAME_MISSING);
    }
    CHKiRet(createInstance(&inst));
    inst->sockName = pNewVal;
    inst->ratelimitInterval = cs.ratelimitInterval;
    inst->pLogHostName = cs.pLogHostName;
    inst->ratelimitBurst = cs.ratelimitBurst;
    inst->ratelimitSeverity = cs.ratelimitSeverity;
    inst->bUseFlowCtl = cs.bUseFlowCtl;
    inst->bIgnoreTimestamp = cs.bIgnoreTimestamp;
    inst->bCreatePath = cs.bCreatePath;
    inst->bUseSysTimeStamp = cs.bUseSysTimeStamp;
    inst->bWritePid = cs.bWritePid;
    inst->bAnnotate = cs.bAnnotate;
    inst->bParseTrusted = cs.bParseTrusted;
    inst->bParseHost = UNSET;
    inst->next = NULL;
    cs.pLogHostName = NULL;
finalize_it:
    RETiRet;
}
static rsRetVal addInstance ( void __attribute__ ( ( unused ) ) * pVal , uchar * pNewVal ) { instanceConf_t * inst ; DEFiRet ; if ( pNewVal == NULL || pNewVal [ 0 ] == ' \0 ' ) { LogError ( 0 , RS_RET_SOCKNAME_MISSING , " " " \n " ) ; if ( pNewVal != NULL ) free ( pNewVal ) ; ABORT_FINALIZE ( RS_RET_SOCKNAME_MISSING ) ; } CHKiRet ( createInstance ( & inst ) ) ; inst -> sockName = pNewVal ; inst -> ratelimitInterval = cs . ratelimitInterval ; inst -> pLogHostName = cs . pLogHostName ; inst -> ratelimitBurst = cs . ratelimitBurst ; inst -> ratelimitSeverity = cs . ratelimitSeverity ; inst -> bUseFlowCtl = cs . bUseFlowCtl ; inst -> bIgnoreTimestamp = cs . bIgnoreTimestamp ; inst -> bCreatePath = cs . bCreatePath ; inst -> bUseSysTimeStamp = cs . bUseSysTimeStamp ; inst -> bWritePid = cs . bWritePid ; inst -> bAnnotate = cs . bAnnotate ; inst -> bParseTrusted = cs . bParseTrusted ; inst -> bParseHost = UNSET ; inst -> next = NULL ; cs . pLogHostName = NULL ; finalize_it : RETiRet ; }
This function is called when a new listen socket instance shall be added to
 the current config object via the legacy config system.
This function is called when a new listen socket instance shall be added to the current config object via the legacy config system .
/* reset hostname for next socket */