From 7fb4c0d19b8f586645f97ca8db2c5ee5dc72b75b Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Mon, 13 Apr 2015 09:35:28 +0200 Subject: [PATCH] fix ICE bug --- coreapi/linphonecall.c | 2 +- tester/call_tester.c | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/coreapi/linphonecall.c b/coreapi/linphonecall.c index 1954b79a5..8a1888341 100644 --- a/coreapi/linphonecall.c +++ b/coreapi/linphonecall.c @@ -1860,7 +1860,7 @@ int linphone_call_prepare_ice(LinphoneCall *call, bool_t incoming_offer){ if ((linphone_core_get_firewall_policy(call->core) == LinphonePolicyUseIce) && (call->ice_session != NULL)){ if (incoming_offer){ remote=sal_call_get_remote_media_description(call->op); - has_video=call->params->has_video && linphone_core_media_description_contains_video_stream(remote); + has_video=linphone_core_video_enabled(call->core) && linphone_core_media_description_contains_video_stream(remote); }else has_video=call->params->has_video; _linphone_call_prepare_ice_for_stream(call,0,TRUE); diff --git a/tester/call_tester.c b/tester/call_tester.c index c8c2b4a4d..e7bfde1b8 100644 --- a/tester/call_tester.c +++ b/tester/call_tester.c @@ -3912,12 +3912,10 @@ static void video_call_with_re_invite_inactive_followed_by_re_invite_no_sdp() { static void video_call_ice_params() { LinphoneCoreManager* marie = linphone_core_manager_new( "marie_rc"); LinphoneCoreManager* pauline = linphone_core_manager_new( "pauline_rc"); - linphone_core_set_stun_server(marie->lc,"stun.linphone.org"); + linphone_core_set_firewall_policy(marie->lc,LinphonePolicyUseIce); - linphone_core_set_stun_server(pauline->lc,"stun.linphone.org"); linphone_core_set_firewall_policy(pauline->lc,LinphonePolicyUseIce); video_call_base(marie,pauline,FALSE,LinphoneMediaEncryptionNone,TRUE,TRUE); - CU_FAIL("200ok ice list is wrong, missing reflexive candidates"); linphone_core_manager_destroy(marie); linphone_core_manager_destroy(pauline); } @@ -3972,7 +3970,6 @@ test_t call_tests[] = { { "Video call using policy with callee video disabled", video_call_using_policy_with_callee_video_disabled }, { "Video call using policy with caller video disabled", video_call_using_policy_with_caller_video_disabled }, { "Video call without SDP",video_call_no_sdp}, - { "Video call with ICE accepted using call params",video_call_ice_params}, { "SRTP ice video call", srtp_video_ice_call }, { "ZRTP ice video call", zrtp_video_ice_call }, { "Call with video added", call_with_video_added }, @@ -3985,6 +3982,7 @@ test_t call_tests[] = { { "Call with multiple early media", multiple_early_media }, { "Call with ICE from video to non-video", call_with_ice_video_to_novideo}, { "Call with ICE and video added", call_with_ice_video_added }, + { "Video call with ICE accepted using call params",video_call_ice_params}, { "Video call recording", video_call_recording_test }, { "Snapshot", video_call_snapshot }, { "Video call with early media and no matching audio codecs", video_call_with_early_media_no_matching_audio_codecs },