update call terminate

This commit is contained in:
Paul Cartier 2020-03-20 16:13:44 +01:00
parent e0759d7912
commit ca38aaa90a
4 changed files with 6 additions and 11 deletions

View file

@ -350,7 +350,7 @@ import AVFoundation
}
}
@objc func terminateCall(call: OpaquePointer?) { // TODO PAUL : needs to be tested with CallKit changes
@objc func terminateCall(call: OpaquePointer?) {
if (call == nil) {
Log.directLog(BCTBX_LOG_ERROR, text: "Can not terminate null call!")
return
@ -360,7 +360,7 @@ import AVFoundation
try call.terminate()
Log.directLog(BCTBX_LOG_DEBUG, text: "Call terminated")
} catch {
Log.directLog(BCTBX_LOG_ERROR, text: "Failed to terminate call")
Log.directLog(BCTBX_LOG_ERROR, text: "Failed to terminate call failed because \(error)")
}
if (UIApplication.shared.applicationState == .background) {
CoreManager.instance().stopIterateTimer()

View file

@ -2135,7 +2135,6 @@ static int comp_call_state_paused(const LinphoneCall *call, const void *param) {
return [documentsPath stringByAppendingPathComponent:file];
}
// TODO PAUL : fonctions a enlever
+ (NSString *)preferenceFile:(NSString *)file {
LinphoneFactory *factory = linphone_factory_get();
NSString *fullPath = [NSString stringWithUTF8String:linphone_factory_get_config_dir(factory, kLinphoneMsgNotificationGroupId.UTF8String)];

View file

@ -143,13 +143,9 @@ extension ProviderDelegate: CXProviderDelegate {
callInfos.removeValue(forKey: uuid)
let call = CallManager.instance().callByCallId(callId: callId)
if (call != nil) {
do {
try call!.terminate() // TODO PAUL
Log.directLog(BCTBX_LOG_MESSAGE, text: "CallKit: Call ended with call-id: \(String(describing: callId)) an UUID: \(uuid.description).")
} catch {
Log.directLog(BCTBX_LOG_ERROR, text: "CallKit: Call ended \(uuid) failed because \(error)")
}
if let call = call {
CallManager.instance().terminateCall(call: call.getCobject);
Log.directLog(BCTBX_LOG_MESSAGE, text: "CallKit: Call ended with call-id: \(String(describing: callId)) an UUID: \(uuid.description).")
}
action.fulfill()
}

View file

@ -48,7 +48,7 @@
asl_add_log_file(NULL, STDERR_FILENO);
stderrInUse = YES;
}
linphone_core_set_log_collection_path([LinphoneManager cacheDirectory].UTF8String); // TODO PAUL : code de migration des logs?
linphone_core_set_log_collection_path([LinphoneManager cacheDirectory].UTF8String);
linphone_core_set_log_handler(linphone_iphone_log_handler);
linphone_core_enable_log_collection(enabled);
if (level == 0) {