forked from mirrors/linphone-iphone
fix crash in useless code
This commit is contained in:
parent
be10db777b
commit
00cc748e7f
3 changed files with 4 additions and 23 deletions
|
|
@ -118,13 +118,10 @@
|
|||
[data->timer invalidate];
|
||||
data->timer = nil;
|
||||
}
|
||||
if ((floor(NSFoundationVersionNumber) <=
|
||||
NSFoundationVersionNumber_iOS_9_x_Max)) {
|
||||
if ([LinphoneManager.instance
|
||||
lpConfigBoolForKey:@"autoanswer_notif_preference"]) {
|
||||
if ((floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_9_x_Max)) {
|
||||
if ([LinphoneManager.instance lpConfigBoolForKey:@"autoanswer_notif_preference"]) {
|
||||
linphone_call_accept(call);
|
||||
[PhoneMainView.instance
|
||||
changeCurrentView:CallView.compositeViewDescription];
|
||||
[PhoneMainView.instance changeCurrentView:CallView.compositeViewDescription];
|
||||
} else {
|
||||
[PhoneMainView.instance displayIncomingCall:call];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -413,7 +413,7 @@ static RootViewManager *rootViewManagerInstance = nil;
|
|||
}
|
||||
case LinphoneCallEnd: {
|
||||
const MSList *calls = linphone_core_get_calls(LC);
|
||||
if (calls == NULL) {
|
||||
if (!calls) {
|
||||
while ((currentView == CallView.compositeViewDescription) ||
|
||||
(currentView == CallIncomingView.compositeViewDescription) ||
|
||||
(currentView == CallOutgoingView.compositeViewDescription)) {
|
||||
|
|
@ -421,17 +421,6 @@ 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;
|
||||
}
|
||||
calls = calls->next;
|
||||
}
|
||||
if (calls == NULL) {
|
||||
[self changeCurrentView:CallView.compositeViewDescription];
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,7 +81,6 @@
|
|||
update.supportsUngrouping = TRUE;
|
||||
update.hasVideo = _pendingCallVideo = video;
|
||||
|
||||
linphone_call_ref(call);
|
||||
// Report incoming call to system
|
||||
LOGD(@"CallKit: report new incoming call");
|
||||
|
||||
|
|
@ -96,17 +95,13 @@
|
|||
else
|
||||
linphone_call_decline(call,LinphoneReasonUnknown);
|
||||
}
|
||||
linphone_call_unref(call);
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)setPendingCall:(LinphoneCall *)pendingCall {
|
||||
if (pendingCall) {
|
||||
_pendingCall = pendingCall;
|
||||
if (_pendingCall)
|
||||
linphone_call_ref(_pendingCall);
|
||||
} else if (_pendingCall) {
|
||||
linphone_call_unref(_pendingCall);
|
||||
_pendingCall = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue