Changeset 4345 for pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
- Timestamp:
- Feb 13, 2013 7:43:32 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/pjsua-lib/pjsua_call.c
r4342 r4345 3060 3060 3061 3061 /* Check if ICE setup is complete and if it needs reinvite */ 3062 for (i = 0; i < call->med_cnt && ice_complete; ++i) {3062 for (i = 0; i < call->med_cnt; ++i) { 3063 3063 pjsua_call_media *call_med = &call->media[i]; 3064 3064 pjmedia_transport_info tpinfo; 3065 unsigned j;3065 pjmedia_ice_transport_info *ice_info; 3066 3066 3067 3067 if (call_med->tp_st == PJSUA_MED_TP_NULL || … … 3074 3074 pjmedia_transport_info_init(&tpinfo); 3075 3075 pjmedia_transport_get_info(call_med->tp, &tpinfo); 3076 for (j = 0; j < tpinfo.specific_info_cnt; ++j) { 3077 pjmedia_ice_transport_info *ice_info; 3078 3079 if (tpinfo.spc_info[j].type != PJMEDIA_TRANSPORT_TYPE_ICE) 3080 continue; 3081 3082 ice_info = (pjmedia_ice_transport_info*)tpinfo.spc_info[j].buffer; 3083 3084 /* Check if ICE setup not completed yet */ 3085 if (ice_info->sess_state < PJ_ICE_STRANS_STATE_RUNNING) { 3086 ice_complete = PJ_FALSE; 3087 break; 3076 ice_info = (pjmedia_ice_transport_info*) 3077 pjmedia_transport_info_get_spc_info( 3078 &tpinfo, PJMEDIA_TRANSPORT_TYPE_ICE); 3079 if (!ice_info) 3080 continue; 3081 3082 /* Check if ICE setup not completed yet */ 3083 if (ice_info->sess_state < PJ_ICE_STRANS_STATE_RUNNING) { 3084 ice_complete = PJ_FALSE; 3085 break; 3086 } 3087 3088 /* Check if ICE needs to send reinvite */ 3089 if (!ice_need_reinv && 3090 ice_info->sess_state == PJ_ICE_STRANS_STATE_RUNNING && 3091 ice_info->role == PJ_ICE_SESS_ROLE_CONTROLLING) 3092 { 3093 pjsua_ice_config *cfg=&pjsua_var.acc[call->acc_id].cfg.ice_cfg; 3094 if ((cfg->ice_always_update && !call->reinv_ice_sent) || 3095 pj_sockaddr_cmp(&tpinfo.sock_info.rtp_addr_name, 3096 &call_med->rtp_addr)) 3097 { 3098 ice_need_reinv = PJ_TRUE; 3088 3099 } 3089 3090 /* Check if ICE needs to send reinvite */3091 if (!ice_need_reinv &&3092 ice_info->sess_state == PJ_ICE_STRANS_STATE_RUNNING &&3093 ice_info->role == PJ_ICE_SESS_ROLE_CONTROLLING)3094 {3095 pjsua_ice_config *cfg=&pjsua_var.acc[call->acc_id].cfg.ice_cfg;3096 if ((cfg->ice_always_update && !call->reinv_ice_sent) ||3097 pj_sockaddr_cmp(&tpinfo.sock_info.rtp_addr_name,3098 &call_med->rtp_addr))3099 {3100 ice_need_reinv = PJ_TRUE;3101 }3102 }3103 break;3104 3100 } 3105 3101 }
Note: See TracChangeset
for help on using the changeset viewer.