fix ICE regression

This commit is contained in:
Simon Morlat 2015-09-25 19:23:20 +02:00
parent 46e3ae725a
commit a4f4d59906
3 changed files with 5 additions and 5 deletions

View file

@ -3479,10 +3479,10 @@ int linphone_core_start_accept_call_update(LinphoneCore *lc, LinphoneCall *call,
linphone_call_make_local_media_description(call);
linphone_call_update_remote_session_id_and_ver(call);
linphone_call_stop_ice_for_inactive_streams(call);
sal_call_set_local_media_description(call->op,call->localdesc);
sal_call_accept(call->op);
md=sal_call_get_final_media_description(call->op);
linphone_call_stop_ice_for_inactive_streams(call, md);
if (md && !sal_media_description_empty(md)){
linphone_core_update_streams(lc, call, md, next_state);
}
@ -3711,12 +3711,13 @@ int linphone_core_accept_call_with_params(LinphoneCore *lc, LinphoneCall *call,
}
linphone_call_update_remote_session_id_and_ver(call);
linphone_call_stop_ice_for_inactive_streams(call);
sal_call_accept(call->op);
linphone_core_notify_display_status(lc,_("Connected."));
lc->current_call=call;
linphone_call_set_state(call,LinphoneCallConnected,"Connected");
new_md=sal_call_get_final_media_description(call->op);
linphone_call_stop_ice_for_inactive_streams(call, new_md);
if (new_md){
linphone_core_update_streams(lc, call, new_md, LinphoneCallStreamsRunning);
linphone_call_set_state(call,LinphoneCallStreamsRunning,"Connected (streams running)");

View file

@ -758,10 +758,9 @@ void linphone_core_update_ice_state_in_call_stats(LinphoneCall *call)
linphone_ice_state_to_string(call->stats[LINPHONE_CALL_STATS_AUDIO].ice_state), linphone_ice_state_to_string(call->stats[LINPHONE_CALL_STATS_VIDEO].ice_state));
}
void linphone_call_stop_ice_for_inactive_streams(LinphoneCall *call) {
void linphone_call_stop_ice_for_inactive_streams(LinphoneCall *call, SalMediaDescription *desc) {
int i;
IceSession *session = call->ice_session;
SalMediaDescription *desc = call->localdesc;
if (session == NULL) return;
if (ice_session_state(session) == IS_Completed) return;

View file

@ -437,7 +437,7 @@ void linphone_core_adapt_to_network(LinphoneCore *lc, int ping_time_ms, Linphone
int linphone_core_gather_ice_candidates(LinphoneCore *lc, LinphoneCall *call);
void linphone_core_update_ice_state_in_call_stats(LinphoneCall *call);
void linphone_call_stats_fill(LinphoneCallStats *stats, MediaStream *ms, OrtpEvent *ev);
void linphone_call_stop_ice_for_inactive_streams(LinphoneCall *call);
void linphone_call_stop_ice_for_inactive_streams(LinphoneCall *call, SalMediaDescription *result);
void _update_local_media_description_from_ice(SalMediaDescription *desc, IceSession *session);
void linphone_call_update_local_media_description_from_ice_or_upnp(LinphoneCall *call);
void linphone_call_update_ice_from_remote_media_description(LinphoneCall *call, const SalMediaDescription *md);