Changeset 2753


Ignore:
Timestamp:
Jun 5, 2009 3:55:28 PM (10 years ago)
Author:
bennylp
Message:

Ticket #844: Assertion in on_rx_rtp(transport_udp.c) possibly due to race condition (thanks Peter Cai and Michael Broughton for the report)

File:
1 edited

Legend:

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

    r2506 r2753  
    638638    PJ_ASSERT_RETURN(!udp->attached, PJ_EINVALIDOP); 
    639639 
     640    /* Lock the ioqueue keys to make sure that callbacks are 
     641     * not executed. See ticket #844 for details. 
     642     */ 
     643    pj_ioqueue_lock_key(udp->rtp_key); 
     644    pj_ioqueue_lock_key(udp->rtcp_key); 
     645 
    640646    /* "Attach" the application: */ 
    641647 
     
    672678    pj_bzero(&udp->rtcp_src_addr, sizeof(udp->rtcp_src_addr)); 
    673679    udp->rtp_src_cnt = 0; 
     680 
     681    /* Unlock keys */ 
     682    pj_ioqueue_unlock_key(udp->rtcp_key); 
     683    pj_ioqueue_unlock_key(udp->rtp_key); 
    674684 
    675685    return PJ_SUCCESS; 
Note: See TracChangeset for help on using the changeset viewer.