Changeset 4196 for pjproject


Ignore:
Timestamp:
Jul 5, 2012 7:02:50 AM (12 years ago)
Author:
bennylp
Message:

Re #1548: Crash due to racing condition in timer when call is disconnected quickly (thanks Joshua Colp for the report!)

Location:
pjproject/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjnath/include/pjnath/ice_session.h

    r3553 r4196  
    620620    pj_bool_t            is_nominating;             /**< Nominating stage   */ 
    621621    pj_bool_t            is_complete;               /**< Complete?          */ 
     622    pj_bool_t            is_destroying;             /**< Destroy is called  */ 
    622623    pj_status_t          ice_status;                /**< Error status.      */ 
    623624    pj_timer_entry       timer;                     /**< ICE timer.         */ 
  • pjproject/trunk/pjnath/src/pjnath/ice_session.c

    r3999 r4196  
    456456    } 
    457457 
     458    ice->is_destroying = PJ_TRUE; 
     459 
    458460    /* Let other callbacks finish */ 
    459461    if (ice->mutex) { 
     
    18411843    clist = td->clist; 
    18421844 
     1845    if (ice->is_destroying) 
     1846        return PJ_SUCCESS; 
     1847 
    18431848    pj_mutex_lock(ice->mutex); 
     1849 
     1850    if (ice->is_destroying) { 
     1851        pj_mutex_unlock(ice->mutex); 
     1852        return PJ_SUCCESS; 
     1853    } 
    18441854 
    18451855    /* Set timer ID to FALSE first */ 
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c

    r4182 r4196  
    518518    pjsua_call *call = NULL; 
    519519    pjsip_dialog *dlg = NULL; 
     520 
     521    if (call_med->call == NULL) 
     522        return; 
    520523 
    521524    acquire_call("med_tp_timer_cb", call_med->call->index, &call, &dlg); 
Note: See TracChangeset for help on using the changeset viewer.