forked from mirrors/linphone-iphone
Do not stop ringing if there's still incoming calls
This commit is contained in:
parent
fca2fd2e1e
commit
148e1d415e
1 changed files with 12 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue