diff --git a/tester/liblinphone_tester.h b/tester/liblinphone_tester.h index a56b27147..e41a1779f 100644 --- a/tester/liblinphone_tester.h +++ b/tester/liblinphone_tester.h @@ -39,6 +39,12 @@ extern "C" { #endif +#ifdef __ANDROID__ +extern jobject system_context; +#else +extern void *system_context; +#endif + extern test_suite_t account_creator_test_suite; extern test_suite_t call_test_suite; diff --git a/tester/setup_tester.c b/tester/setup_tester.c index 52c468816..419614ed0 100644 --- a/tester/setup_tester.c +++ b/tester/setup_tester.c @@ -121,7 +121,7 @@ static void linphone_version_test(void){ static void core_init_test(void) { LinphoneCore* lc; - lc = linphone_factory_create_core(linphone_factory_get(),NULL,NULL,NULL); + lc = linphone_factory_create_core_2(linphone_factory_get(),NULL,NULL,NULL, NULL, system_context); /* until we have good certificates on our test server... */ linphone_core_verify_server_certificates(lc,FALSE); @@ -138,7 +138,7 @@ static void linphone_address_test(void) { static void core_sip_transport_test(void) { LinphoneCore* lc; LCSipTransports tr; - lc = linphone_factory_create_core(linphone_factory_get(),NULL,NULL,NULL); + lc = linphone_factory_create_core_2(linphone_factory_get(),NULL,NULL,NULL, NULL, system_context); if (!BC_ASSERT_PTR_NOT_NULL(lc)) return; linphone_core_get_sip_transports(lc,&tr); BC_ASSERT_EQUAL(tr.udp_port,5060, int, "%d"); /*default config*/ @@ -167,7 +167,7 @@ static void linphone_interpret_url_test(void) { LinphoneAddress* address; LinphoneProxyConfig *proxy_config; char *tmp; - lc = linphone_factory_create_core(linphone_factory_get(),NULL,NULL,NULL); + lc = linphone_factory_create_core_2(linphone_factory_get(),NULL,NULL,NULL, NULL, system_context); if (!BC_ASSERT_PTR_NOT_NULL( lc )) return; proxy_config =linphone_core_create_proxy_config(lc); @@ -360,7 +360,7 @@ void linphone_proxy_config_is_server_config_changed_test(void) { static void chat_room_test(void) { LinphoneCore* lc; - lc = linphone_factory_create_core(linphone_factory_get(),NULL,NULL,NULL); + lc = linphone_factory_create_core_2(linphone_factory_get(),NULL,NULL,NULL, NULL, system_context); if (!BC_ASSERT_PTR_NOT_NULL(lc)) return; BC_ASSERT_PTR_NOT_NULL(linphone_core_get_chat_room_from_uri(lc,"sip:toto@titi.com")); linphone_core_unref(lc); diff --git a/tester/vcard_tester.c b/tester/vcard_tester.c index 84cfcd62f..3d7172e2b 100644 --- a/tester/vcard_tester.c +++ b/tester/vcard_tester.c @@ -265,7 +265,7 @@ static void friends_sqlite_storage(void) { cbs = linphone_factory_create_core_cbs(linphone_factory_get()); linphone_core_cbs_set_friend_list_created(cbs, friend_list_created_cb); linphone_core_cbs_set_friend_list_removed(cbs, friend_list_removed_cb); - lc = linphone_factory_create_core(linphone_factory_get(), cbs, NULL, NULL); + lc = linphone_factory_create_core_2(linphone_factory_get(), cbs, NULL, NULL, NULL, system_context); linphone_core_cbs_unref(cbs); friends = linphone_friend_list_get_friends(linphone_core_get_default_friend_list(lc)); lfl = linphone_core_create_friend_list(lc);