mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-07 14:18:25 +00:00
Repair some regressions caused by the changes made for RAT.
This commit is contained in:
parent
7dedf2cf8f
commit
504c1df3f7
2 changed files with 1 additions and 41 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue