Commit 56436814 authored by Ghislain MARY's avatar Ghislain MARY
Browse files

Fix belle-sip-tester for Windows Universal.

parent 5364b6e1
...@@ -46,7 +46,7 @@ static void nativeOutputTraceHandler(int lev, const char *fmt, va_list args) ...@@ -46,7 +46,7 @@ static void nativeOutputTraceHandler(int lev, const char *fmt, va_list args)
} }
} }
static void belleSipNativeOutputTraceHandler(const char *domain, BctbxLogLevel lev, const char *fmt, va_list args) static void belleSipNativeOutputTraceHandler(void *info, const char *domain, BctbxLogLevel lev, const char *fmt, va_list args)
{ {
nativeOutputTraceHandler((int)lev, fmt, args); nativeOutputTraceHandler((int)lev, fmt, args);
} }
...@@ -103,6 +103,7 @@ bool NativeTester::run(Platform::String^ suiteName, Platform::String^ caseName, ...@@ -103,6 +103,7 @@ bool NativeTester::run(Platform::String^ suiteName, Platform::String^ caseName,
std::wstring wscasename = caseName->Data(); std::wstring wscasename = caseName->Data();
char csuitename[MAX_SUITE_NAME_SIZE] = { 0 }; char csuitename[MAX_SUITE_NAME_SIZE] = { 0 };
char ccasename[MAX_SUITE_NAME_SIZE] = { 0 }; char ccasename[MAX_SUITE_NAME_SIZE] = { 0 };
bctbx_log_handler_t *log_handler = bctbx_create_log_handler(belleSipNativeOutputTraceHandler, NULL, NULL);
wcstombs(csuitename, wssuitename.c_str(), sizeof(csuitename)); wcstombs(csuitename, wssuitename.c_str(), sizeof(csuitename));
wcstombs(ccasename, wscasename.c_str(), sizeof(ccasename)); wcstombs(ccasename, wscasename.c_str(), sizeof(ccasename));
...@@ -112,7 +113,6 @@ bool NativeTester::run(Platform::String^ suiteName, Platform::String^ caseName, ...@@ -112,7 +113,6 @@ bool NativeTester::run(Platform::String^ suiteName, Platform::String^ caseName,
else { else {
belle_sip_set_log_level(BELLE_SIP_LOG_ERROR); belle_sip_set_log_level(BELLE_SIP_LOG_ERROR);
} }
bctbx_log_handler_t* log_handler = bctbx_create_log_handler(belleSipNativeOutputTraceHandler, NULL, NULL);
bctbx_add_log_handler(log_handler); bctbx_add_log_handler(log_handler);
return bc_tester_run_tests(wssuitename == all ? 0 : csuitename, wscasename == all ? 0 : ccasename, NULL) != 0; return bc_tester_run_tests(wssuitename == all ? 0 : csuitename, wscasename == all ? 0 : ccasename, NULL) != 0;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment