Ignore:
Timestamp:
Mar 31, 2014 10:19:27 AM (11 years ago)
Author:
ming
Message:

Fixed #1756: Race condition in SIP transaction termination (thanks to Kevin Harwell for the patch)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsip/sip_transaction.c

    r4787 r4807  
    16111611    PJ_ASSERT_RETURN(code >= 200, PJ_EINVAL); 
    16121612 
    1613     if (tsx->state >= PJSIP_TSX_STATE_TERMINATED) 
    1614         return PJ_SUCCESS; 
    1615  
    16161613    pj_log_push_indent(); 
    16171614 
    16181615    pj_grp_lock_acquire(tsx->grp_lock); 
    1619     tsx_set_status_code(tsx, code, NULL); 
    1620     tsx_set_state( tsx, PJSIP_TSX_STATE_TERMINATED, PJSIP_EVENT_USER, NULL); 
     1616 
     1617    if (tsx->state < PJSIP_TSX_STATE_TERMINATED) { 
     1618        tsx_set_status_code(tsx, code, NULL); 
     1619        tsx_set_state( tsx, PJSIP_TSX_STATE_TERMINATED, PJSIP_EVENT_USER, NULL); 
     1620    } 
    16211621    pj_grp_lock_release(tsx->grp_lock); 
    16221622 
Note: See TracChangeset for help on using the changeset viewer.