Changeset 3796


Ignore:
Timestamp:
Oct 6, 2011 6:49:09 AM (12 years ago)
Author:
ming
Message:

Re #1266:

  • Make sure that all media transports are already created and completed to fix the assertion when making call using ICE.
  • Change the callback pjsua_med_tp_state_cb to return pj_status_t (instead of void)
Location:
pjproject/trunk/pjsip
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/include/pjsua-lib/pjsua.h

    r3786 r3796  
    531531  * @param call_id      The call ID. 
    532532  * @param info         The media transport state info. 
     533  * 
     534  * @return             The callback must return PJ_SUCCESS at the moment. 
    533535  */ 
    534 typedef void (*pjsua_med_tp_state_cb)(pjsua_call_id call_id, 
    535                                       const pjsua_med_tp_state_info *info); 
     536typedef pj_status_t 
     537(*pjsua_med_tp_state_cb)(pjsua_call_id call_id, 
     538                         const pjsua_med_tp_state_info *info); 
    536539 
    537540 
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c

    r3780 r3796  
    631631                                      call->secure_level, dlg->pool, 
    632632                                      NULL, NULL, PJ_TRUE, 
    633                                       (pjsua_med_tp_state_cb) 
    634633                                      &on_make_call_med_tp_complete); 
    635634    if (status == PJ_SUCCESS) { 
     
    10971096                                      offer, 
    10981097                                      &sip_err_code, PJ_TRUE, 
    1099                                       (pjsua_med_tp_state_cb) 
    11001098                                      &on_incoming_call_med_tp_complete); 
    11011099    if (status == PJ_SUCCESS) { 
  • pjproject/trunk/pjsip/src/pjsua-lib/pjsua_media.c

    r3780 r3796  
    14821482            pjsua_call_media *call_med = &call->media[mi]; 
    14831483 
    1484             if (call_med->med_init_cb) { 
     1484            if (call_med->med_init_cb || 
     1485                call_med->tp_st == PJSUA_MED_TP_NULL) 
     1486            { 
    14851487                pj_mutex_unlock(call->med_ch_mutex); 
    14861488                return PJ_SUCCESS; 
     
    16981700                                           security_level, sip_err_code, 
    16991701                                           async, 
    1700                                            (async? (pjsua_med_tp_state_cb) 
    1701                                            &media_channel_init_cb: NULL)); 
     1702                                           (async? &media_channel_init_cb: 
     1703                                            NULL)); 
    17021704            if (status == PJ_EPENDING) { 
    17031705                pending_med_tp = PJ_TRUE; 
Note: See TracChangeset for help on using the changeset viewer.