fix auto-resuming of call in case of transfer failures

This commit is contained in:
Simon Morlat 2012-04-03 16:18:23 +02:00
parent 05e04e2059
commit cb41acb925

View file

@ -585,6 +585,10 @@ static void call_failure(SalOp *op, SalError error, SalReason sr, const char *de
lc->ringstream=NULL;
}
linphone_call_stop_media_streams (call);
if (call->referer && linphone_call_get_state(call->referer)==LinphoneCallPaused && call->referer->was_automatically_paused){
/*resume to the call that send us the refer automatically*/
linphone_core_resume_call(lc,call->referer);
}
if (sr == SalReasonDeclined) {
call->reason=LinphoneReasonDeclined;
linphone_call_set_state(call,LinphoneCallEnd,"Call declined.");
@ -594,10 +598,6 @@ static void call_failure(SalOp *op, SalError error, SalReason sr, const char *de
} else {
linphone_call_set_state(call,LinphoneCallError,msg);
}
if (call->referer && linphone_call_get_state(call->referer)==LinphoneCallPaused && call->referer->was_automatically_paused){
/*resume to the call that send us the refer automatically*/
linphone_core_resume_call(lc,call->referer);
}
}
static void call_released(SalOp *op){