mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
fix ICE call without SDP test
This commit is contained in:
parent
eb6462663a
commit
a6aa0a50a5
3 changed files with 24 additions and 7 deletions
|
|
@ -583,6 +583,7 @@ LinphoneCall * linphone_call_new_incoming(LinphoneCore *lc, LinphoneAddress *fro
|
|||
LinphoneCall *call=ms_new0(LinphoneCall,1);
|
||||
char *from_str;
|
||||
const SalMediaDescription *md;
|
||||
LinphoneFirewallPolicy fpol;
|
||||
|
||||
call->dir=LinphoneCallIncoming;
|
||||
sal_op_set_user_pointer(op,call);
|
||||
|
|
@ -628,16 +629,22 @@ LinphoneCall * linphone_call_new_incoming(LinphoneCore *lc, LinphoneAddress *fro
|
|||
// In this case WE chose the media parameters according to policy.
|
||||
call->params.has_video &= linphone_core_media_description_contains_video_stream(md);
|
||||
}
|
||||
fpol=linphone_core_get_firewall_policy(call->core);
|
||||
/*create the ice session now if ICE is required*/
|
||||
if (linphone_core_get_firewall_policy(call->core)==LinphonePolicyUseIce){
|
||||
call->ice_session = ice_session_new();
|
||||
ice_session_set_role(call->ice_session, IR_Controlled);
|
||||
if (fpol==LinphonePolicyUseIce){
|
||||
if (md){
|
||||
call->ice_session = ice_session_new();
|
||||
ice_session_set_role(call->ice_session, IR_Controlled);
|
||||
}else{
|
||||
fpol=LinphonePolicyNoFirewall;
|
||||
ms_warning("ICE not supported for incoming INVITE without SDP.");
|
||||
}
|
||||
}
|
||||
/*reserve the sockets immediately*/
|
||||
linphone_call_init_media_streams(call);
|
||||
switch (linphone_core_get_firewall_policy(call->core)) {
|
||||
switch (fpol) {
|
||||
case LinphonePolicyUseIce:
|
||||
linphone_call_prepare_ice(call,md!=NULL);
|
||||
linphone_call_prepare_ice(call,TRUE);
|
||||
break;
|
||||
case LinphonePolicyUseStun:
|
||||
call->ping_time=linphone_core_run_stun_tests(call->core,call);
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 79c18b75112262460fff45493e70733a2c35333c
|
||||
Subproject commit ae94af9abbfb56bedcd37485bc38934ebbbc9c87
|
||||
|
|
@ -633,12 +633,22 @@ static void call_with_ice(void){
|
|||
_call_with_ice(TRUE,TRUE,FALSE);
|
||||
}
|
||||
|
||||
/*ICE is not expected to work in this case, however this should not crash*/
|
||||
static void call_with_ice_no_sdp(void){
|
||||
LinphoneCoreManager* marie = linphone_core_manager_new( "marie_rc");
|
||||
LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_rc");
|
||||
|
||||
linphone_core_enable_sdp_200_ack(pauline->lc,TRUE);
|
||||
_call_with_ice_base(pauline,marie,TRUE,TRUE,FALSE);
|
||||
|
||||
linphone_core_set_firewall_policy(marie->lc,LinphonePolicyUseIce);
|
||||
linphone_core_set_stun_server(marie->lc,"stun.linphone.org");
|
||||
|
||||
linphone_core_set_firewall_policy(pauline->lc,LinphonePolicyUseIce);
|
||||
linphone_core_set_stun_server(pauline->lc,"stun.linphone.org");
|
||||
|
||||
call(pauline,marie);
|
||||
|
||||
liblinphone_tester_check_rtcp(marie,pauline);
|
||||
|
||||
linphone_core_manager_destroy(marie);
|
||||
linphone_core_manager_destroy(pauline);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue