Commit a8078ca9 authored by Simon Morlat's avatar Simon Morlat

add checks and fix bug where a call is directly transitionned to Released...

add checks and fix bug where a call is directly transitionned to Released state when an io error occurs during a reINVITE.
parent c6c13b26
......@@ -149,11 +149,15 @@ static void call_process_io_error(void *user_ctx, const belle_sip_io_error_event
if (op->state == SalOpStateTerminated) return;
if (op->pending_client_trans && (belle_sip_transaction_get_state(BELLE_SIP_TRANSACTION(op->pending_client_trans)) == BELLE_SIP_TRANSACTION_INIT)) {
/* Call terminated very very early, before INVITE is even sent, probably DNS resolution timeout. */
sal_error_info_set(&op->error_info, SalReasonIOError, 503, "IO error", NULL);
op->base.root->callbacks.call_failure(op);
op->state = SalOpStateTerminating;
call_set_released(op);
if (!op->dialog || belle_sip_dialog_get_state(op->dialog) != BELLE_SIP_DIALOG_CONFIRMED){
/* Call terminated very very early, before INVITE is even sent, probably DNS resolution timeout. */
op->state = SalOpStateTerminating;
call_set_released(op);
}
} else {
/* Nothing to be done. If the error comes from a connectivity loss,
* the call will be marked as broken, and an attempt to repair it will be done. */
......
......@@ -983,6 +983,11 @@ static void _call_with_ice_video(LinphoneVideoPolicy caller_policy, LinphoneVide
/* Wait for ICE reINVITEs to complete. */
BC_ASSERT_TRUE(wait_for(pauline->lc, marie->lc, &pauline->stat.number_of_LinphoneCallStreamsRunning, 2)
&& wait_for(pauline->lc, pauline->lc, &marie->stat.number_of_LinphoneCallStreamsRunning, 2));
if (callee_policy.automatically_accept == FALSE){
marie_remote_params = linphone_call_get_remote_params(linphone_core_get_current_call(marie->lc));
/*The ICE reINVITE must not propose again video if was refused by callee*/
BC_ASSERT_FALSE(linphone_call_params_video_enabled(marie_remote_params));
}
BC_ASSERT_TRUE(check_ice(pauline, marie, LinphoneIceStateHostConnection));
BC_ASSERT_TRUE(check_nb_media_starts(pauline, marie, nb_media_starts, nb_media_starts));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment