From 7721875fe1b3e813a358babe631a70b0830bbfa8 Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Fri, 3 Jul 2015 09:23:40 +0200 Subject: [PATCH] tester: fix compilation --- mediastreamer2 | 2 +- tester/common/bc_tester_utils.h | 2 ++ tester/message_tester.c | 10 +++++----- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/mediastreamer2 b/mediastreamer2 index 4a21478fb..cef9ff276 160000 --- a/mediastreamer2 +++ b/mediastreamer2 @@ -1 +1 @@ -Subproject commit 4a21478fb08ebf0aa9e6a9cbedc13f123d008dcb +Subproject commit cef9ff2764a6317baee7e011847866b14b8b77d4 diff --git a/tester/common/bc_tester_utils.h b/tester/common/bc_tester_utils.h index 86192091d..b3c1deaae 100644 --- a/tester/common/bc_tester_utils.h +++ b/tester/common/bc_tester_utils.h @@ -26,8 +26,10 @@ #include #ifdef _WIN32 +#ifndef snprintf #define snprintf _snprintf #endif +#endif extern int bc_printf_verbosity_info; extern int bc_printf_verbosity_error; diff --git a/tester/message_tester.c b/tester/message_tester.c index 57bdb6c46..a491cbb86 100644 --- a/tester/message_tester.c +++ b/tester/message_tester.c @@ -577,7 +577,7 @@ static void small_file_transfer_message(void) { #ifdef HAVE_LIME static FILE* fopen_from_write_dir(const char * name, const char * mode) { - char *filepath = bc_tester_res("%s", bc_tester_writable_dir_prefix,name); + char *filepath = bc_tester_file(name); FILE * file = fopen(filepath,mode); ms_free(filepath); return file; @@ -628,11 +628,11 @@ static void lime_file_transfer_message_base(bool_t encrypt_file) { ms_free(marie_id); ms_free(pauline_id); - filepath = bc_tester_res("%s", bc_tester_writable_dir_prefix,"tmpZIDCacheMarie.xml"); + filepath = bc_tester_file("tmpZIDCacheMarie.xml"); linphone_core_set_zrtp_secrets_file(marie->lc, filepath); ms_free(filepath); - filepath = bc_tester_res("%s", bc_tester_writable_dir_prefix,"tmpZIDCachePauline.xml"); + filepath = bc_tester_file("tmpZIDCachePauline.xml"); linphone_core_set_zrtp_secrets_file(pauline->lc, filepath); ms_free(filepath); @@ -889,11 +889,11 @@ static void lime_text_message(void) { fclose(ZIDCacheMarieFD); fclose(ZIDCachePaulineFD); - filepath = bc_tester_res("%s", bc_tester_writable_dir_prefix,"tmpZIDCacheMarie.xml"); + filepath = bc_tester_file("tmpZIDCacheMarie.xml"); linphone_core_set_zrtp_secrets_file(marie->lc, filepath); ms_free(filepath); - filepath = bc_tester_res("%s", bc_tester_writable_dir_prefix,"tmpZIDCachePauline.xml"); + filepath = bc_tester_file("tmpZIDCachePauline.xml"); linphone_core_set_zrtp_secrets_file(pauline->lc, filepath); ms_free(filepath);