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/nsd_ptcp.c
static rsRetVal Send(nsd_t* pNsd, uchar* pBuf, ssize_t* pLenBuf)
{
    nsd_ptcp_t* pThis = (nsd_ptcp_t*)pNsd;
    ssize_t written;
    DEFiRet;
    ISOBJ_TYPE_assert(pThis, nsd_ptcp);

    written = send(pThis->sock, pBuf, *pLenBuf, 0);

    if (written == -1)
    {
        switch (errno)
        {
            case EAGAIN:
            case EINTR:
                /* this is fine, just retry... */
                written = 0;
                break;
            default:
                ABORT_FINALIZE(RS_RET_IO_ERROR);
                break;
        }
    }

    *pLenBuf = written;
finalize_it:
    RETiRet;
}
/* send a buffer. On entry, pLenBuf contains the number of octets to
 * write. On exit, it contains the number of octets actually written.
 * If this number is lower than on entry, only a partial buffer has
 * been written.
 * rgerhards, 2008-03-19
 */
send a buffer. On entry, pLenBuf contains the number of octets to
write. On exit, it contains the number of octets actually written.
If this number is lower than on entry, only a partial buffer has
been written.
send a buffer . On entry pLenBuf contains the number of octets to write . On exit it contains the number of octets actually written . If this number is lower than on entry only a partial buffer has been written .
static rsRetVal Send(nsd_t* pNsd, uchar* pBuf, ssize_t* pLenBuf)
{
    nsd_ptcp_t* pThis = (nsd_ptcp_t*)pNsd;
    ssize_t written;
    DEFiRet;
    ISOBJ_TYPE_assert(pThis, nsd_ptcp);
    written = send(pThis->sock, pBuf, *pLenBuf, 0);
    if (written == -1)
    {
        switch (errno)
        {
            case EAGAIN:
            case EINTR:
                written = 0;
                break;
            default:
                ABORT_FINALIZE(RS_RET_IO_ERROR);
                break;
        }
    }
    *pLenBuf = written;
finalize_it:
    RETiRet;
}
static rsRetVal Send ( nsd_t * pNsd , uchar * pBuf , ssize_t * pLenBuf ) { nsd_ptcp_t * pThis = ( nsd_ptcp_t * ) pNsd ; ssize_t written ; DEFiRet ; ISOBJ_TYPE_assert ( pThis , nsd_ptcp ) ; written = send ( pThis -> sock , pBuf , * pLenBuf , 0 ) ; if ( written == -1 ) { switch ( errno ) { case EAGAIN : case EINTR : written = 0 ; break ; default : ABORT_FINALIZE ( RS_RET_IO_ERROR ) ; break ; } } * pLenBuf = written ; finalize_it : RETiRet ; }
send a buffer.
send a buffer .
/* this is fine, just retry... */