diff --git a/coreapi/callbacks.c b/coreapi/callbacks.c index 7f901195f..52c6d4070 100644 --- a/coreapi/callbacks.c +++ b/coreapi/callbacks.c @@ -46,9 +46,6 @@ void linphone_core_update_streams(LinphoneCore *lc, LinphoneCall *call, SalMedia 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){ diff --git a/coreapi/misc.c b/coreapi/misc.c index 035017b51..b9176ebd4 100644 --- a/coreapi/misc.c +++ b/coreapi/misc.c @@ -883,7 +883,7 @@ void linphone_core_update_ice_from_remote_media_description(LinphoneCall *call, 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); @@ -945,19 +945,6 @@ bool_t linphone_core_media_description_contains_video_stream(const SalMediaDescr 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; diff --git a/coreapi/private.h b/coreapi/private.h index 0cefb1476..82ebf3633 100644 --- a/coreapi/private.h +++ b/coreapi/private.h @@ -252,7 +252,6 @@ void linphone_core_update_ice_state_in_call_stats(LinphoneCall *call); 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);