tester: use ms_strdup when setting writable/readable directories

This commit is contained in:
Gautier Pelloux-Prayer 2015-03-30 17:04:42 +02:00
parent ce839ab96e
commit d23d945068
3 changed files with 7 additions and 10 deletions

View file

@ -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();

View file

@ -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);

@ -1 +1 @@
Subproject commit 873d01e1deb747f1c0a8896df6ac6d7e53793d23
Subproject commit 18448cf64f20927f9b4a30ff2ca3c6b076d515b8