Changeset 5234


Ignore:
Timestamp:
Jan 15, 2016 3:32:26 AM (5 years ago)
Author:
nanang
Message:

Misc (re #1882): Suppress EAGAIN recv() error log in pjmedia stream.c & vid_stream.c (thanks Christian Ambach for the patch).

Location:
pjproject/trunk/pjmedia/src/pjmedia
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia/stream.c

    r5187 r5234  
    16291629    if (bytes_read < 0) { 
    16301630        status = (pj_status_t)-bytes_read; 
     1631        if (status == PJ_STATUS_FROM_OS(OSERR_EWOULDBLOCK)) { 
     1632            return; 
     1633        } 
    16311634        if (stream->rtp_rx_last_err != status) { 
    16321635            char errmsg[PJ_ERR_MSG_SIZE]; 
     
    18951898    /* Check for errors */ 
    18961899    if (bytes_read < 0) { 
    1897         LOGERR_((stream->port.info.name.ptr, "RTCP recv() error", 
    1898                 (pj_status_t)-bytes_read)); 
     1900        if (bytes_read != -PJ_STATUS_FROM_OS(OSERR_EWOULDBLOCK)) { 
     1901            LOGERR_((stream->port.info.name.ptr, "RTCP recv() error", 
     1902                    (pj_status_t)-bytes_read)); 
     1903        } 
    18991904        return; 
    19001905    } 
  • pjproject/trunk/pjmedia/src/pjmedia/vid_stream.c

    r5101 r5234  
    608608    if (bytes_read < 0) { 
    609609        status = (pj_status_t)-bytes_read; 
     610        if (status == PJ_STATUS_FROM_OS(OSERR_EWOULDBLOCK)) { 
     611            return; 
     612        } 
    610613        if (stream->rtp_rx_last_err != status) { 
    611614            char errmsg[PJ_ERR_MSG_SIZE]; 
     
    787790    /* Check for errors */ 
    788791    if (bytes_read < 0) { 
    789         LOGERR_((stream->cname.ptr, "RTCP recv() error",  
    790                  (pj_status_t)-bytes_read)); 
     792        if (bytes_read != -PJ_STATUS_FROM_OS(OSERR_EWOULDBLOCK)) { 
     793            LOGERR_((stream->cname.ptr, "RTCP recv() error", 
     794                    (pj_status_t)-bytes_read)); 
     795        } 
    791796        return; 
    792797    } 
Note: See TracChangeset for help on using the changeset viewer.