From 504c1df3f7cca9c4383e44eaf163da6c1fde40cc Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Tue, 18 Oct 2016 11:04:50 +0200 Subject: [PATCH] Repair some regressions caused by the changes made for RAT. --- coreapi/callbacks.c | 5 +---- tester/call_single_tester.c | 37 ------------------------------------- 2 files changed, 1 insertion(+), 41 deletions(-) diff --git a/coreapi/callbacks.c b/coreapi/callbacks.c index 26bfec92c..8071fd851 100644 --- a/coreapi/callbacks.c +++ b/coreapi/callbacks.c @@ -248,8 +248,7 @@ static LinphoneCall * look_for_broken_call_to_replace(SalOp *h, LinphoneCore *lc LinphoneCall *call = (LinphoneCall *)bctbx_list_get_data(it); SalOp *replaced_op = sal_call_get_replaces(h); if (replaced_op) replaced_call = (LinphoneCall*)sal_op_get_user_pointer(replaced_op); - if ((call->broken && sal_call_compare_op(h, call->op)) - || (replaced_call && replaced_call == call)){ + if (call->broken && (sal_call_compare_op(h, call->op) || (replaced_call && replaced_call == call))) { return call; } it = bctbx_list_next(it); @@ -669,8 +668,6 @@ static void call_updated(LinphoneCore *lc, LinphoneCall *call, SalOp *op, bool_t case LinphoneCallPausedByRemote: if (sal_media_description_has_dir(rmd,SalStreamSendRecv) || sal_media_description_has_dir(rmd,SalStreamRecvOnly)){ call_resumed(lc,call); - }else if (sal_media_description_has_dir(rmd,SalStreamSendOnly) || sal_media_description_has_dir(rmd,SalStreamInactive)){ - call_paused_by_remote(lc,call); /* This can happen if the 200 OK of the re-INVITE has not reached the other party and that this one re-sends a new re-INVITE */ }else{ call_updated_by_remote(lc, call); } diff --git a/tester/call_single_tester.c b/tester/call_single_tester.c index e925d0d65..74549b3ff 100644 --- a/tester/call_single_tester.c +++ b/tester/call_single_tester.c @@ -4156,41 +4156,6 @@ static void call_record_with_custom_rtp_modifier(void) { custom_rtp_modifier(FALSE, TRUE); } -static void _call_with_network_switch_in_early_state(bool_t network_loosed_by_caller){ - LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc"); - LinphoneCoreManager* pauline = linphone_core_manager_new(transport_supported(LinphoneTransportTls) ? "pauline_rc" : "pauline_tcp_rc"); - - linphone_core_invite_address(marie->lc, pauline->identity); - if (!BC_ASSERT_TRUE(wait_for(marie->lc, pauline->lc, &pauline->stat.number_of_LinphoneCallIncomingReceived, 1))) goto end; - if (!BC_ASSERT_TRUE(wait_for(marie->lc, pauline->lc, &marie->stat.number_of_LinphoneCallOutgoingRinging, 1))) goto end; - if (network_loosed_by_caller){ - linphone_core_set_network_reachable(marie->lc, FALSE); - BC_ASSERT_TRUE(wait_for(marie->lc, pauline->lc, &marie->stat.number_of_LinphoneCallError, 1)); - linphone_core_set_network_reachable(marie->lc, TRUE); - linphone_core_terminate_call(pauline->lc, linphone_core_get_current_call(pauline->lc)); - BC_ASSERT_TRUE(wait_for(marie->lc, pauline->lc, &pauline->stat.number_of_LinphoneCallEnd, 1)); - }else{ - linphone_core_set_network_reachable(pauline->lc, FALSE); - BC_ASSERT_TRUE(wait_for(marie->lc, pauline->lc, &pauline->stat.number_of_LinphoneCallError, 1)); - linphone_core_set_network_reachable(pauline->lc, TRUE); - linphone_core_terminate_call(marie->lc, linphone_core_get_current_call(marie->lc)); - BC_ASSERT_TRUE(wait_for(marie->lc, pauline->lc, &marie->stat.number_of_LinphoneCallEnd, 1)); - } - BC_ASSERT_TRUE(wait_for(marie->lc, pauline->lc, &marie->stat.number_of_LinphoneCallReleased, 1)); - BC_ASSERT_TRUE(wait_for(marie->lc, pauline->lc, &pauline->stat.number_of_LinphoneCallReleased, 1)); -end: - linphone_core_manager_destroy(marie); - linphone_core_manager_destroy(pauline); -} - -static void call_with_network_switch_in_early_state_1(void){ - _call_with_network_switch_in_early_state(TRUE); -} - -static void call_with_network_switch_in_early_state_2(void){ - _call_with_network_switch_in_early_state(FALSE); -} - static void recovered_call_on_network_switch_in_early_state_1(void) { LinphoneCall *incoming_call; LinphoneCoreManager* marie = linphone_core_manager_new("marie_rc"); @@ -5310,8 +5275,6 @@ test_t call_tests[] = { TEST_NO_TAG("Call paused resumed with custom RTP Modifier", call_paused_resumed_with_custom_rtp_modifier), TEST_NO_TAG("Call record with custom RTP Modifier", call_record_with_custom_rtp_modifier), TEST_NO_TAG("Call with network switch", call_with_network_switch), - TEST_NO_TAG("Call with network switch in early state 1", call_with_network_switch_in_early_state_1), - TEST_NO_TAG("Call with network switch in early state 2", call_with_network_switch_in_early_state_2), TEST_NO_TAG("Recovered call on network switch in early state 1", recovered_call_on_network_switch_in_early_state_1), TEST_NO_TAG("Recovered call on network switch in early state 2", recovered_call_on_network_switch_in_early_state_2), TEST_NO_TAG("Recovered call on network switch in early state 3", recovered_call_on_network_switch_in_early_state_3),