Ignore:
Timestamp:
May 28, 2015 7:07:17 AM (7 years ago)
Author:
nanang
Message:

Misc (re #1843): Updated error message in pjmedia stream & video stream upon RTP receiving failure, also avoid printing the same message repeatedly of same subsequent failures.

File:
1 edited

Legend:

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

    r5043 r5101  
    227227 
    228228    pj_uint32_t              rtp_rx_last_ts;        /**< Last received RTP timestamp*/ 
     229    pj_status_t              rtp_rx_last_err;       /**< Last RTP recv() error */ 
    229230}; 
    230231 
     
    16321633    /* Check for errors */ 
    16331634    if (bytes_read < 0) { 
    1634         LOGERR_((stream->port.info.name.ptr, "RTP recv() error", 
    1635                 (pj_status_t)-bytes_read)); 
     1635        status = (pj_status_t)-bytes_read; 
     1636        if (stream->rtp_rx_last_err != status) { 
     1637            char errmsg[PJ_ERR_MSG_SIZE]; 
     1638            pj_strerror(status, errmsg, sizeof(errmsg)); 
     1639            PJ_LOG(4,(stream->port.info.name.ptr, 
     1640                      "Unable to receive RTP packet, recv() returned %d: %s", 
     1641                      status, errmsg)); 
     1642            stream->rtp_rx_last_err = status; 
     1643        } 
    16361644        return; 
     1645    } else { 
     1646        stream->rtp_rx_last_err = PJ_SUCCESS; 
    16371647    } 
    16381648 
Note: See TracChangeset for help on using the changeset viewer.