Commit d2843d52 authored by Svalorzen's avatar Svalorzen Committed by Gautier Pelloux-Prayer

Fixes infinite loop since if call redirection fails the calls don't actually get terminated.

parent 4eced3bf
......@@ -745,14 +745,16 @@ lpc_cmd_redirect(LinphoneCore *lc, char *args){
if (linphone_call_get_state(call)==LinphoneCallIncomingReceived){
if (linphone_core_redirect_call(lc,call,args) != 0) {
linphonec_out("Could not redirect call.\n");
elem=elem->next;
} else {
didit=1;
/*as the redirection closes the call, we need to re-check the call list that is invalidated.*/
elem=linphone_core_get_calls(lc);
}
didit=1;
/*as the redirection closes the call, we need to re-check the call list that is invalidated.*/
elem=linphone_core_get_calls(lc);
}else elem=elem->next;
}
if (didit==0){
linphonec_out("There is no pending incoming call to redirect.");
linphonec_out("There is no pending incoming call to redirect.\n");
}
return 1;
}
......
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