From a37648852ef4ac24c109195b4af67ead5c01ddf6 Mon Sep 17 00:00:00 2001 From: Guillaume BIENKOWSKI Date: Wed, 17 Dec 2014 15:38:20 +0100 Subject: [PATCH] Fix the debug traces in DEBUG at first launch: the userpref migration was messing up the default value --- Classes/LinphoneManager.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Classes/LinphoneManager.m b/Classes/LinphoneManager.m index 289c4decc..007547a20 100644 --- a/Classes/LinphoneManager.m +++ b/Classes/LinphoneManager.m @@ -283,8 +283,6 @@ struct codec_name_pref_table codec_pref_table[]={ NSString *confiFileName = [LinphoneManager documentFile:@".linphonerc"]; configDb=lp_config_new_with_factory([confiFileName cStringUsingEncoding:[NSString defaultCStringEncoding]] , [factoryConfig cStringUsingEncoding:[NSString defaultCStringEncoding]]); - [self migrateFromUserPrefs]; - //set default values for first boot if (lp_config_get_string(configDb,LINPHONERC_APPLICATION_KEY,"debugenable_preference",NULL)==NULL){ #ifdef DEBUG @@ -293,6 +291,8 @@ struct codec_name_pref_table codec_pref_table[]={ [self lpConfigSetBool:FALSE forKey:@"debugenable_preference"]; #endif } + + [self migrateFromUserPrefs]; } return self; } @@ -1431,7 +1431,7 @@ static BOOL libStarted = FALSE; #endif /*to make sure we don't loose debug trace*/ - if ([self lpConfigBoolForKey:@"debugenable_preference"]) { + if ([self lpConfigBoolForKey:@"debugenable_preference"]) { linphone_core_enable_logs_with_cb((OrtpLogFunc)linphone_iphone_log_handler); ortp_set_log_level_mask(ORTP_DEBUG|ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL); /*must be done before creating linphone core to get its traces too*/