Ignore:
Timestamp:
Oct 3, 2011 8:22:48 AM (10 years ago)
Author:
ming
Message:

Re #1266: Modified pjsua_media_channel_deinit() to resume deinit in the callback (instead of returning PJ_EBUSY) and make sure the right transport is used before calling dlg_respond()

File:
1 edited

Legend:

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

    r3778 r3780  
    358358    } 
    359359 
     360    /* pjsua_media_channel_deinit() has been called. */ 
     361    if (call->async_call.med_ch_deinit) 
     362        goto on_error; 
     363 
    360364    /* Create offer */ 
    361365    status = pjsua_media_channel_create_sdp(call->index, dlg->pool, NULL, 
     
    709713        goto on_return; 
    710714    } 
    711      
     715 
     716    /* pjsua_media_channel_deinit() has been called. */ 
     717    if (call->async_call.med_ch_deinit) { 
     718        pjsua_media_channel_deinit(call->index); 
     719        call->med_ch_cb = NULL; 
     720        PJSUA_UNLOCK(); 
     721        return PJ_SUCCESS; 
     722    } 
     723 
    712724    /* Get remote SDP offer (if any). */ 
    713725    if (call->inv->neg) 
     
    10561068        pjsua_media_channel_deinit(call->index); 
    10571069        goto on_return; 
     1070    } 
     1071 
     1072    /* If account is locked to specific transport, then lock dialog 
     1073     * to this transport too. 
     1074     */ 
     1075    if (pjsua_var.acc[acc_id].cfg.transport_id != PJSUA_INVALID_ID) { 
     1076        pjsip_tpselector tp_sel; 
     1077 
     1078        pjsua_init_tpselector(pjsua_var.acc[acc_id].cfg.transport_id, &tp_sel); 
     1079        pjsip_dlg_set_transport(dlg, &tp_sel); 
    10581080    } 
    10591081 
     
    11271149        if (pjmedia_sdp_neg_get_neg_remote(inv->neg, &remote_sdp)==PJ_SUCCESS) 
    11281150            update_remote_nat_type(call, remote_sdp); 
    1129     } 
    1130  
    1131     /* If account is locked to specific transport, then lock dialog 
    1132      * to this transport too. 
    1133      */ 
    1134     if (pjsua_var.acc[acc_id].cfg.transport_id != PJSUA_INVALID_ID) { 
    1135         pjsip_tpselector tp_sel; 
    1136  
    1137         pjsua_init_tpselector(pjsua_var.acc[acc_id].cfg.transport_id, &tp_sel); 
    1138         pjsip_dlg_set_transport(dlg, &tp_sel); 
    11391151    } 
    11401152 
Note: See TracChangeset for help on using the changeset viewer.