mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-23 06:08:07 +00:00
Handle the case where ICE is activated locally but the remote does not support it.
This commit is contained in:
parent
df347a9733
commit
cec1d35fed
2 changed files with 12 additions and 3 deletions
|
|
@ -396,13 +396,17 @@ LinphoneCall * linphone_call_new_incoming(LinphoneCore *lc, LinphoneAddress *fro
|
|||
call->localdesc=create_local_media_description (lc,call);
|
||||
call->camera_active=call->params.has_video;
|
||||
switch (linphone_core_get_firewall_policy(call->core)) {
|
||||
case LinphonePolicyUseStun:
|
||||
linphone_core_run_stun_tests(call->core,call);
|
||||
break;
|
||||
case LinphonePolicyUseIce:
|
||||
linphone_core_gather_ice_candidates(call->core, call);
|
||||
break;
|
||||
case LinphonePolicyUseStun:
|
||||
linphone_core_run_stun_tests(call->core,call);
|
||||
/* No break to also destroy ice session in this case. */
|
||||
default:
|
||||
if (sal_op_get_ice_session(call->op) != NULL) {
|
||||
ice_session_destroy(sal_op_get_ice_session(call->op));
|
||||
sal_op_set_ice_session(call->op, NULL);
|
||||
}
|
||||
break;
|
||||
}
|
||||
discover_mtu(lc,linphone_address_get_domain(from));
|
||||
|
|
|
|||
|
|
@ -689,6 +689,11 @@ int sdp_to_media_description(sdp_message_t *msg, SalMediaDescription *desc, IceS
|
|||
ice_session_set_remote_credentials(*ice_session, ice_ufrag, ice_pwd);
|
||||
ice_dump_session(*ice_session);
|
||||
}
|
||||
if ((ice_session_just_created == FALSE) && ((ice_ufrag == NULL) || (ice_pwd == NULL))) {
|
||||
/* We started with ICE activated but the peer apparently do not support ICE, so stop using it. */
|
||||
ice_session_destroy(*ice_session);
|
||||
*ice_session = NULL;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue