From d23d94506820cbfdcfb8da24b067342726542d42 Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Mon, 30 Mar 2015 17:04:42 +0200 Subject: [PATCH] tester: use ms_strdup when setting writable/readable directories --- LinphoneTester Tests/LinphoneTester_Tests.m | 6 ++---- LinphoneTester/MasterViewController.m | 9 ++++----- submodules/linphone | 2 +- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/LinphoneTester Tests/LinphoneTester_Tests.m b/LinphoneTester Tests/LinphoneTester_Tests.m index 0f0ed3914..01dcb0e32 100644 --- a/LinphoneTester Tests/LinphoneTester_Tests.m +++ b/LinphoneTester Tests/LinphoneTester_Tests.m @@ -60,11 +60,9 @@ void LSLog(NSString* fmt, ...){ LSLog(@"Bundle path: %@", bundlePath); LSLog(@"Document path: %@", documentPath); + bc_tester_read_dir_prefix = ms_strdup(bundle); + bc_tester_writable_dir_prefix = ms_strdup(documents); - bc_tester_read_dir_prefix = bundle; - bc_tester_writable_dir_prefix = documents; - linphone_core_set_log_collection_path(bc_tester_writable_dir_prefix); - liblinphone_tester_keep_accounts(TRUE); int count = bc_tester_nb_suites(); diff --git a/LinphoneTester/MasterViewController.m b/LinphoneTester/MasterViewController.m index f4ebf40b9..ea2966a68 100644 --- a/LinphoneTester/MasterViewController.m +++ b/LinphoneTester/MasterViewController.m @@ -11,6 +11,7 @@ #import "DetailViewController.h" #include "linphone/liblinphone_tester.h" +#include "mediastreamer2/msutils.h" @interface MasterViewController () { NSMutableArray *_objects; @@ -70,13 +71,11 @@ static void linphone_log_function(OrtpLogLevel lev, const char *fmt, va_list arg NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); documentPath = [paths objectAtIndex:0]; - bc_tester_init((void (*)(int, const char *fm, va_list))linphone_log_function, ORTP_MESSAGE, ORTP_ERROR); liblinphone_tester_add_suites(); - - bc_tester_read_dir_prefix = [bundlePath UTF8String]; - bc_tester_writable_dir_prefix = [documentPath UTF8String]; - linphone_core_set_log_collection_path(bc_tester_writable_dir_prefix); + + bc_tester_read_dir_prefix = ms_strdup([bundlePath UTF8String]); + bc_tester_writable_dir_prefix = ms_strdup([documentPath UTF8String]); LSLog(@"Bundle path: %@", bundlePath); LSLog(@"Document path: %@", documentPath); diff --git a/submodules/linphone b/submodules/linphone index 873d01e1d..18448cf64 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 873d01e1deb747f1c0a8896df6ac6d7e53793d23 +Subproject commit 18448cf64f20927f9b4a30ff2ca3c6b076d515b8