mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
fix crash of call
This commit is contained in:
parent
ab279345ae
commit
1075515bb9
2 changed files with 9 additions and 10 deletions
|
|
@ -422,11 +422,10 @@ static RootViewManager *rootViewManagerInstance = nil;
|
|||
} else {
|
||||
linphone_call_resume((LinphoneCall *)calls->data);
|
||||
while (calls) {
|
||||
if (linphone_call_get_state((LinphoneCall *)calls->data) == LinphoneCallIncomingReceived ||
|
||||
linphone_call_get_state((LinphoneCall *)calls->data) == LinphoneCallIncomingEarlyMedia) {
|
||||
[self displayIncomingCall:(LinphoneCall *)calls->data];
|
||||
break;
|
||||
}
|
||||
if (calls->next) {
|
||||
[self changeCurrentView:CallView.compositeViewDescription];
|
||||
break;
|
||||
}
|
||||
calls = calls->next;
|
||||
}
|
||||
if (calls == NULL) {
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@
|
|||
return;
|
||||
|
||||
self.callKitCalls++;
|
||||
[self setPendingCall:call];
|
||||
self.pendingCall = call;
|
||||
}
|
||||
|
||||
- (void)provider:(CXProvider *)provider performStartCallAction:(CXStartCallAction *)action {
|
||||
|
|
@ -129,6 +129,7 @@
|
|||
call = [LinphoneManager.instance callByCallId:callID];
|
||||
}
|
||||
if (call != NULL) {
|
||||
self.callKitCalls++;
|
||||
self.pendingCall = call;
|
||||
}
|
||||
}
|
||||
|
|
@ -243,7 +244,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
self.pendingCall = NULL;
|
||||
[self setPendingCall:NULL];
|
||||
if (_pendingAddr)
|
||||
linphone_address_unref(_pendingAddr);
|
||||
_pendingAddr = NULL;
|
||||
|
|
@ -251,9 +252,8 @@
|
|||
}
|
||||
|
||||
- (void)provider:(CXProvider *)provider didDeactivateAudioSession:(nonnull AVAudioSession *)audioSession {
|
||||
LOGD(@"CallKit: Audio session deactivated");
|
||||
|
||||
self.pendingCall = NULL;
|
||||
LOGD(@"CallKit : Audio session deactivated");
|
||||
[self setPendingCall:NULL];
|
||||
if (_pendingAddr)
|
||||
linphone_address_unref(_pendingAddr);
|
||||
_pendingAddr = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue