diff --git a/Classes/SettingsView.m b/Classes/SettingsView.m index b94dd49b1..98cf47fe5 100644 --- a/Classes/SettingsView.m +++ b/Classes/SettingsView.m @@ -525,7 +525,9 @@ static UICompositeViewDescription *compositeDescription = nil; [hiddenKeys addObject:@"flush_images_button"]; #endif - if (![LinphoneManager.instance lpConfigBoolForKey:@"debugenable_preference"]) { + int debugLevel = [LinphoneManager.instance lpConfigIntForKey:@"debugenable_preference"]; + BOOL debugEnabled = (debugLevel >= ORTP_DEBUG && debugLevel < ORTP_ERROR); + if (!debugEnabled) { [hiddenKeys addObject:@"send_logs_button"]; [hiddenKeys addObject:@"reset_logs_button"]; } @@ -756,6 +758,7 @@ static UICompositeViewDescription *compositeDescription = nil; [attachments addObject:@[ [NSString stringWithUTF8String:filepath], mimeType, filename ]]; } } + ms_free(filepath); if ([LinphoneManager.instance lpConfigBoolForKey:@"send_logs_include_linphonerc_and_chathistory"]) { // retrieve linphone rc @@ -770,8 +773,16 @@ static UICompositeViewDescription *compositeDescription = nil; ]]; } + if (attachments.count == 0) { + DTAlertView *alert = [[DTAlertView alloc] + initWithTitle:NSLocalizedString(@"Cannot send logs", nil) + message:NSLocalizedString(@"Nothing could be collected from your application, aborting now.", nil)]; + [alert addCancelButtonWithTitle:NSLocalizedString(@"Cancel", nil) block:nil]; + [alert show]; + return; + } + [self emailAttachments:attachments]; - ms_free(filepath); } - (void)emailAttachments:(NSArray *)attachments { NSString *error = nil; diff --git a/Classes/Utils/Log.m b/Classes/Utils/Log.m index 7892d4eae..62239776e 100644 --- a/Classes/Utils/Log.m +++ b/Classes/Utils/Log.m @@ -52,8 +52,8 @@ + (void)enableLogs:(OrtpLogLevel)level { BOOL enabled = (level >= ORTP_DEBUG && level < ORTP_ERROR); linphone_core_set_log_collection_path([self cacheDirectory].UTF8String); - linphone_core_enable_log_collection(enabled); linphone_core_enable_logs_with_cb(linphone_iphone_log_handler); + linphone_core_enable_log_collection(enabled); if (level == 0) { linphone_core_set_log_level(ORTP_FATAL); ortp_set_log_level("ios", ORTP_FATAL); diff --git a/Resources/ar.lproj/Localizable.strings b/Resources/ar.lproj/Localizable.strings index ed540700f..5d9c6834b 100644 Binary files a/Resources/ar.lproj/Localizable.strings and b/Resources/ar.lproj/Localizable.strings differ diff --git a/Resources/de.lproj/Localizable.strings b/Resources/de.lproj/Localizable.strings index 9e278211e..74d6dcd3d 100644 Binary files a/Resources/de.lproj/Localizable.strings and b/Resources/de.lproj/Localizable.strings differ diff --git a/Resources/en.lproj/Localizable.strings b/Resources/en.lproj/Localizable.strings index fc30dc2dd..f3ee7ba04 100644 Binary files a/Resources/en.lproj/Localizable.strings and b/Resources/en.lproj/Localizable.strings differ diff --git a/Resources/fr.lproj/Localizable.strings b/Resources/fr.lproj/Localizable.strings index 381c93859..4b706262a 100644 Binary files a/Resources/fr.lproj/Localizable.strings and b/Resources/fr.lproj/Localizable.strings differ diff --git a/Resources/ja.lproj/Localizable.strings b/Resources/ja.lproj/Localizable.strings index 22db269aa..975e04fa0 100644 Binary files a/Resources/ja.lproj/Localizable.strings and b/Resources/ja.lproj/Localizable.strings differ diff --git a/Resources/nl.lproj/Localizable.strings b/Resources/nl.lproj/Localizable.strings index 0a15e0a97..08a828b2d 100644 Binary files a/Resources/nl.lproj/Localizable.strings and b/Resources/nl.lproj/Localizable.strings differ diff --git a/Resources/ru.lproj/Localizable.strings b/Resources/ru.lproj/Localizable.strings index d076f7b66..bb72bf4a6 100644 Binary files a/Resources/ru.lproj/Localizable.strings and b/Resources/ru.lproj/Localizable.strings differ diff --git a/Resources/sv.lproj/Localizable.strings b/Resources/sv.lproj/Localizable.strings index 941585af3..5d343096a 100644 Binary files a/Resources/sv.lproj/Localizable.strings and b/Resources/sv.lproj/Localizable.strings differ diff --git a/Resources/zh_TW.lproj/Localizable.strings b/Resources/zh_TW.lproj/Localizable.strings index 61940e39b..fd27211c6 100644 Binary files a/Resources/zh_TW.lproj/Localizable.strings and b/Resources/zh_TW.lproj/Localizable.strings differ