call->media_pending=TRUE;
}
call->resultdesc=new_md;
- if (call->ice_session != NULL) {
- linphone_core_deactivate_ice_for_deactivated_media_streams(call, call->resultdesc);
- }
if ((call->audiostream && call->audiostream->ticker) || (call->videostream && call->videostream->ticker)){
/* we already started media: check if we really need to restart it*/
if (oldmd){
if (stream->ice_mismatch == TRUE) {
ice_check_list_set_state(cl, ICL_Failed);
} else if (stream->rtp_port == 0) {
- ice_session_remove_check_list(call->ice_session, ice_session_check_list(call->ice_session, i));
+ ice_session_remove_check_list(call->ice_session, cl);
} else {
if ((stream->ice_pwd[0] != '\0') && (stream->ice_ufrag[0] != '\0'))
ice_check_list_set_remote_credentials(cl, stream->ice_ufrag, stream->ice_pwd);
return FALSE;
}
-void linphone_core_deactivate_ice_for_deactivated_media_streams(LinphoneCall *call, const SalMediaDescription *md)
-{
- int i;
- for (i = 0; i < md->nstreams; i++) {
- IceCheckList *cl = ice_session_check_list(call->ice_session, i);
- if (cl && (md->streams[i].rtp_port == 0)) {
- if (ice_check_list_state(cl) != ICL_Completed) {
- ice_session_remove_check_list(call->ice_session, cl);
- }
- }
- }
-}
-
LinphoneCall * is_a_linphone_call(void *user_pointer){
LinphoneCall *call=(LinphoneCall*)user_pointer;
if (call==NULL) return NULL;
void linphone_core_update_local_media_description_from_ice(SalMediaDescription *desc, IceSession *session);
void linphone_core_update_ice_from_remote_media_description(LinphoneCall *call, const SalMediaDescription *md);
bool_t linphone_core_media_description_contains_video_stream(const SalMediaDescription *md);
-void linphone_core_deactivate_ice_for_deactivated_media_streams(LinphoneCall *call, const SalMediaDescription *md);
void linphone_core_send_initial_subscribes(LinphoneCore *lc);
void linphone_core_write_friends_config(LinphoneCore* lc);