Changeset 402


Ignore:
Timestamp:
Apr 19, 2006 2:45:08 PM (19 years ago)
Author:
bennylp
Message:

Changed stream.c so it won't quit after recvfrom returns ECONNRESET

File:
1 edited

Legend:

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

    r397 r402  
    509509            goto read_next_packet; 
    510510 
     511        if (bytes_read < 0) 
     512            goto read_next_packet; 
    511513 
    512514        /* Update RTP and RTCP session. */ 
     
    590592                                      &stream->rtp_addrlen); 
    591593 
    592     } while (status == PJ_SUCCESS); 
     594        if (status != PJ_SUCCESS) { 
     595            bytes_read = -status; 
     596        } 
     597 
     598    } while (status == PJ_SUCCESS || 
     599             status == PJ_STATUS_FROM_OS(OSERR_ECONNRESET)); 
    593600 
    594601    if (status != PJ_SUCCESS && status != PJ_EPENDING) { 
     
    596603 
    597604        pj_strerror(status, errmsg, sizeof(errmsg)); 
    598         PJ_LOG(4,(THIS_FILE, "Error reading RTP packet: %s [status=%d]", 
     605        PJ_LOG(4,(THIS_FILE, "Error reading RTP packet: %s [status=%d]. " 
     606                             "RTP stream thread quitting!", 
    599607                             errmsg, status)); 
    600608    } 
Note: See TracChangeset for help on using the changeset viewer.