Commit 148e1d41 authored by Benjamin REIS's avatar Benjamin REIS

Do not stop ringing if there's still incoming calls

parent fca2fd2e
......@@ -5250,6 +5250,8 @@ LinphoneStatus linphone_call_resume(LinphoneCall *call) {
static void terminate_call(LinphoneCall *call) {
LinphoneCore *lc = linphone_call_get_core(call);
const bctbx_list_t *calls = linphone_core_get_calls(lc);
bool_t stop_ringing = true;
if ((call->state == LinphoneCallIncomingReceived) && (linphone_error_info_get_reason(call->ei) != LinphoneReasonNotAnswered)){
linphone_error_info_set_reason(call->ei, LinphoneReasonDeclined);
......@@ -5257,7 +5259,16 @@ static void terminate_call(LinphoneCall *call) {
}
/* Stop ringing */
linphone_core_stop_ringing(lc);
while(calls) {
if (((LinphoneCall *)calls->data)->state == LinphoneCallIncomingReceived) {
stop_ringing = false;
break;
}
calls = calls->next;
}
if(stop_ringing) {
linphone_core_stop_ringing(lc);
}
linphone_call_stop_media_streams(call);
#ifdef BUILD_UPNP
......
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