Changeset 4280


Ignore:
Timestamp:
Oct 8, 2012 5:23:34 AM (8 years ago)
Author:
ming
Message:

Fixed #1591: Fixed dialog locking in acquire_call() when media transport is created asynchronously.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c

    r4273 r4280  
    15091509    pj_status_t status = PJ_SUCCESS; 
    15101510    pj_time_val time_start, timeout; 
     1511    pjsip_dialog *dlg = NULL; 
    15111512 
    15121513    pj_gettimeofday(&time_start); 
     
    15361537        has_pjsua_lock = PJ_TRUE; 
    15371538        call = &pjsua_var.calls[call_id]; 
    1538  
    1539         if (call->inv == NULL) { 
     1539        if (call->inv) 
     1540            dlg = call->inv->dlg; 
     1541        else 
     1542            dlg = call->async_call.dlg; 
     1543 
     1544        if (dlg == NULL) { 
    15401545            PJSUA_UNLOCK(); 
    15411546            PJ_LOG(3,(THIS_FILE, "Invalid call_id %d in %s", call_id, title)); 
     
    15431548        } 
    15441549 
    1545         status = pjsip_dlg_try_inc_lock(call->inv->dlg); 
     1550        status = pjsip_dlg_try_inc_lock(dlg); 
    15461551        if (status != PJ_SUCCESS) { 
    15471552            PJSUA_UNLOCK(); 
     
    15681573     
    15691574    *p_call = call; 
    1570     *p_dlg = call->inv->dlg; 
     1575    *p_dlg = dlg; 
    15711576 
    15721577    return PJ_SUCCESS; 
Note: See TracChangeset for help on using the changeset viewer.