Ignore:
Timestamp:
Feb 13, 2015 11:34:26 AM (9 years ago)
Author:
ming
Message:

Fixed #1815: Race condition of STUN transaction destruction

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjnath/src/pjnath/stun_session.c

    r4606 r4983  
    150150    pj_stun_client_tsx_stop(tsx); 
    151151    if (tdata) { 
    152         tsx_erase(tdata->sess, tdata); 
     152        pj_stun_session *sess = tdata->sess; 
     153         
     154        pj_grp_lock_acquire(sess->grp_lock); 
     155        tsx_erase(sess, tdata); 
    153156        pj_pool_release(tdata->pool); 
    154     } 
     157        pj_grp_lock_release(sess->grp_lock); 
     158    } 
     159 
     160    pj_stun_client_tsx_destroy(tsx); 
    155161 
    156162    TRACE_((THIS_FILE, "STUN transaction %p destroyed", tsx)); 
Note: See TracChangeset for help on using the changeset viewer.