Commit 97a3bfdd authored by Simon Morlat's avatar Simon Morlat
Browse files

fix bug consisting in implicif avpf being deactivated accidentally by ICE reINVITE.

parent 8377540f
......@@ -4353,27 +4353,16 @@ static void handle_ice_events(LinphoneCall *call, OrtpEvent *ev){
OrtpEventData *evd=ortp_event_get_data(ev);
if (evt == ORTP_EVENT_ICE_SESSION_PROCESSING_FINISHED) {
LinphoneCallParams *params = linphone_call_params_copy(call->current_params);
switch (call->params->media_encryption) {
case LinphoneMediaEncryptionZRTP:
case LinphoneMediaEncryptionDTLS:
/* preserve media encryption param because at that time ZRTP/SRTP-DTLS negociation may still be ongoing*/
params->media_encryption=call->params->media_encryption;
break;
case LinphoneMediaEncryptionSRTP:
case LinphoneMediaEncryptionNone:
/*keep all values to make sure a warning will be generated by compiler if new enum value is added*/
break;
}
switch (ice_session_state(call->ice_session)) {
case IS_Completed:
case IS_Failed:
/* At least one ICE session has succeeded, so perform a call update. */
if (ice_session_has_completed_check_list(call->ice_session) == TRUE) {
if (ice_session_role(call->ice_session) == IR_Controlling && params->update_call_when_ice_completed ) {
if (ice_session_role(call->ice_session) == IR_Controlling && call->params->update_call_when_ice_completed ) {
LinphoneCallParams *params = linphone_core_create_call_params(call->core, call);
params->internal_call_update = TRUE;
linphone_core_update_call(call->core, call, params);
linphone_call_params_unref(params);
}
start_dtls_on_all_streams(call);
}
......@@ -4381,9 +4370,7 @@ static void handle_ice_events(LinphoneCall *call, OrtpEvent *ev){
default:
break;
}
linphone_core_update_ice_state_in_call_stats(call);
linphone_call_params_unref(params);
} else if (evt == ORTP_EVENT_ICE_GATHERING_FINISHED) {
if (evd->info.ice_processing_successful==FALSE) {
ms_warning("No STUN answer from [%s], continuing without STUN",linphone_core_get_stun_server(call->core));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment