From 5baf4362f07bcac8e3b751995602fff3e6aae987 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Thu, 10 Mar 2016 17:57:27 +0100 Subject: [PATCH] Fix some depreciation warnings. --- console/commands.c | 12 +++++------ coreapi/bellesip_sal/sal_impl.c | 14 ++++++------- coreapi/friend.c | 2 +- coreapi/help/buddy_status.c | 2 +- coreapi/help/registration.c | 2 +- coreapi/linphonecore.c | 30 +++++++++++++-------------- coreapi/linphonecore_jni.cc | 5 ++--- coreapi/private.h | 2 +- gtk/buddylookup.c | 5 +++-- gtk/calllogs.c | 2 +- gtk/chat.c | 5 +++-- tester/call_tester.c | 36 ++++++++++++++++++++++----------- tester/presence_tester.c | 2 +- tester/register_tester.c | 12 +++++------ tester/vcard_tester.c | 4 ++-- tester/video_tester.c | 9 ++++++--- 16 files changed, 79 insertions(+), 65 deletions(-) diff --git a/console/commands.c b/console/commands.c index dadd0b8dd..095ab3f18 100644 --- a/console/commands.c +++ b/console/commands.c @@ -1062,7 +1062,7 @@ lpc_cmd_friend(LinphoneCore *lc, char *args) linphonec_friend_add(lc, name, addr); #else LinphoneFriend *new_friend; - new_friend = linphone_friend_new_with_address(args); + new_friend = linphone_core_create_friend_with_address(lc, args); linphone_core_add_friend(lc, new_friend); #endif return 1; @@ -1895,7 +1895,7 @@ linphonec_friend_add(LinphoneCore *lc, const char *name, const char *addr) char url[PATH_MAX]; snprintf(url, PATH_MAX, "%s <%s>", name, addr); - newFriend = linphone_friend_new_with_address(url); + newFriend = linphone_core_create_friend_with_address(lc, url); linphone_core_add_friend(lc, newFriend); return 0; } @@ -1946,8 +1946,7 @@ static int lpc_cmd_register(LinphoneCore *lc, char *args){ if (!args) { /* it means that you want to register the default proxy */ - LinphoneProxyConfig *cfg=NULL; - linphone_core_get_default_proxy(lc,&cfg); + LinphoneProxyConfig *cfg = linphone_core_get_default_proxy_config(lc); if (cfg) { if(!linphone_proxy_config_is_registered(cfg)) { @@ -1994,8 +1993,7 @@ static int lpc_cmd_register(LinphoneCore *lc, char *args){ } static int lpc_cmd_unregister(LinphoneCore *lc, char *args){ - LinphoneProxyConfig *cfg=NULL; - linphone_core_get_default_proxy(lc,&cfg); + LinphoneProxyConfig *cfg = linphone_core_get_default_proxy_config(lc); if (cfg && linphone_proxy_config_is_registered(cfg)) { linphone_proxy_config_edit(cfg); linphone_proxy_config_enable_register(cfg,FALSE); @@ -2023,7 +2021,7 @@ static int lpc_cmd_status(LinphoneCore *lc, char *args) LinphoneProxyConfig *cfg; if ( ! args ) return 0; - linphone_core_get_default_proxy(lc,&cfg); + cfg = linphone_core_get_default_proxy_config(lc); if (strstr(args,"register")) { if (cfg) diff --git a/coreapi/bellesip_sal/sal_impl.c b/coreapi/bellesip_sal/sal_impl.c index 0de7bf200..90aea4c4c 100644 --- a/coreapi/bellesip_sal/sal_impl.c +++ b/coreapi/bellesip_sal/sal_impl.c @@ -740,13 +740,13 @@ static void set_tls_properties(Sal *ctx){ belle_sip_listening_point_t *lp=belle_sip_provider_get_listening_point(ctx->prov,"TLS"); if (lp){ belle_sip_tls_listening_point_t *tlp=BELLE_SIP_TLS_LISTENING_POINT(lp); - int verify_exceptions=0; - - if (!ctx->tls_verify) verify_exceptions=BELLE_SIP_TLS_LISTENING_POINT_BADCERT_ANY_REASON; - else if (!ctx->tls_verify_cn) verify_exceptions=BELLE_SIP_TLS_LISTENING_POINT_BADCERT_CN_MISMATCH; - - belle_sip_tls_listening_point_set_root_ca(tlp,ctx->root_ca); /*root_ca might be NULL */ - belle_sip_tls_listening_point_set_verify_exceptions(tlp,verify_exceptions); + belle_tls_crypto_config_t *crypto_config = belle_tls_crypto_config_new(); + int verify_exceptions = BELLE_TLS_VERIFY_NONE; + if (!ctx->tls_verify) verify_exceptions = BELLE_TLS_VERIFY_ANY_REASON; + else if (!ctx->tls_verify_cn) verify_exceptions = BELLE_TLS_VERIFY_CN_MISMATCH; + belle_tls_crypto_config_set_verify_exceptions(crypto_config, verify_exceptions); + if (ctx->root_ca != NULL) belle_tls_crypto_config_set_root_ca(crypto_config, ctx->root_ca); + belle_sip_tls_listening_point_set_crypto_config(tlp, crypto_config); } } diff --git a/coreapi/friend.c b/coreapi/friend.c index 1a749bbd9..41d191535 100644 --- a/coreapi/friend.c +++ b/coreapi/friend.c @@ -123,7 +123,7 @@ void __linphone_friend_do_subscribe(LinphoneFriend *fr){ fr->subscribe_active=TRUE; } -LinphoneFriend * linphone_friend_new(){ +LinphoneFriend * linphone_friend_new(void){ LinphoneFriend *obj = belle_sip_object_new(LinphoneFriend); obj->pol = LinphoneSPAccept; obj->presence = NULL; diff --git a/coreapi/help/buddy_status.c b/coreapi/help/buddy_status.c index cd7f13d52..0734b78ce 100644 --- a/coreapi/help/buddy_status.c +++ b/coreapi/help/buddy_status.c @@ -156,7 +156,7 @@ int main(int argc, char *argv[]){ } if (dest_friend) { - my_friend = linphone_friend_new_with_address(dest_friend); /*creates friend object from dest*/ + my_friend = linphone_core_create_friend_with_address(lc, dest_friend); /*creates friend object from dest*/ if (my_friend == NULL) { printf("bad destination uri for friend [%s]\n",dest_friend); goto end; diff --git a/coreapi/help/registration.c b/coreapi/help/registration.c index 8dbab6440..e61ab9b01 100644 --- a/coreapi/help/registration.c +++ b/coreapi/help/registration.c @@ -125,7 +125,7 @@ int main(int argc, char *argv[]){ ms_usleep(50000); } - linphone_core_get_default_proxy(lc,&proxy_cfg); /* get default proxy config*/ + proxy_cfg = linphone_core_get_default_proxy_config(lc); /* get default proxy config*/ linphone_proxy_config_edit(proxy_cfg); /*start editing proxy configuration*/ linphone_proxy_config_enable_register(proxy_cfg,FALSE); /*de-activate registration for this proxy config*/ linphone_proxy_config_done(proxy_cfg); /*initiate REGISTER with expire = 0*/ diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index f48ae05fc..5ae3a00f7 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -1760,8 +1760,8 @@ static void linphone_core_init(LinphoneCore * lc, const LinphoneCoreVTable *vtab lc->network_last_status = FALSE; lc->http_provider = belle_sip_stack_create_http_provider(sal_get_belle_sip_stack(lc->sal), "0.0.0.0"); - lc->http_verify_policy = belle_tls_verify_policy_new(); - belle_http_provider_set_tls_verify_policy(lc->http_provider,lc->http_verify_policy); + lc->http_crypto_config = belle_tls_crypto_config_new(); + belle_http_provider_set_tls_crypto_config(lc->http_provider,lc->http_crypto_config); certificates_config_read(lc); @@ -2672,10 +2672,10 @@ void linphone_core_iterate(LinphoneCore *lc){ } if (linphone_core_get_global_state(lc) == LinphoneGlobalStartup) { if (sal_get_root_ca(lc->sal)) { - belle_tls_verify_policy_t *tls_policy = belle_tls_verify_policy_new(); - belle_tls_verify_policy_set_root_ca(tls_policy, sal_get_root_ca(lc->sal)); - belle_http_provider_set_tls_verify_policy(lc->http_provider, tls_policy); - belle_sip_object_unref(tls_policy); + belle_tls_crypto_config_t *crypto_config = belle_tls_crypto_config_new(); + belle_tls_crypto_config_set_root_ca(crypto_config, sal_get_root_ca(lc->sal)); + belle_http_provider_set_tls_crypto_config(lc->http_provider, crypto_config); + belle_sip_object_unref(crypto_config); } linphone_core_notify_display_status(lc, _("Configuring")); @@ -4847,8 +4847,8 @@ const char *linphone_core_get_ring(const LinphoneCore *lc){ **/ void linphone_core_set_root_ca(LinphoneCore *lc,const char *path){ sal_set_root_ca(lc->sal, path); - if (lc->http_verify_policy){ - belle_tls_verify_policy_set_root_ca(lc->http_verify_policy,path); + if (lc->http_crypto_config){ + belle_tls_crypto_config_set_root_ca(lc->http_crypto_config,path); } lp_config_set_string(lc->config,"sip","root_ca",path); } @@ -4871,8 +4871,8 @@ const char *linphone_core_get_root_ca(LinphoneCore *lc){ **/ void linphone_core_verify_server_certificates(LinphoneCore *lc, bool_t yesno){ sal_verify_server_certificates(lc->sal,yesno); - if (lc->http_verify_policy){ - belle_tls_verify_policy_set_exceptions(lc->http_verify_policy, yesno ? 0 : BELLE_TLS_VERIFY_ANY_REASON); + if (lc->http_crypto_config){ + belle_tls_crypto_config_set_verify_exceptions(lc->http_crypto_config, yesno ? 0 : BELLE_TLS_VERIFY_ANY_REASON); } lp_config_set_int(lc->config,"sip","verify_server_certs",yesno); } @@ -4883,8 +4883,8 @@ void linphone_core_verify_server_certificates(LinphoneCore *lc, bool_t yesno){ **/ void linphone_core_verify_server_cn(LinphoneCore *lc, bool_t yesno){ sal_verify_server_cn(lc->sal,yesno); - if (lc->http_verify_policy){ - belle_tls_verify_policy_set_exceptions(lc->http_verify_policy, yesno ? 0 : BELLE_TLS_VERIFY_CN_MISMATCH); + if (lc->http_crypto_config){ + belle_tls_crypto_config_set_verify_exceptions(lc->http_crypto_config, yesno ? 0 : BELLE_TLS_VERIFY_CN_MISMATCH); } lp_config_set_int(lc->config,"sip","verify_server_cn",yesno); } @@ -6351,9 +6351,9 @@ void sip_config_uninit(LinphoneCore *lc) belle_sip_object_unref(lc->http_provider); lc->http_provider=NULL; } - if (lc->http_verify_policy){ - belle_sip_object_unref(lc->http_verify_policy); - lc->http_verify_policy=NULL; + if (lc->http_crypto_config){ + belle_sip_object_unref(lc->http_crypto_config); + lc->http_crypto_config=NULL; } sal_iterate(lc->sal); /*make sure event are purged*/ sal_uninit(lc->sal); diff --git a/coreapi/linphonecore_jni.cc b/coreapi/linphonecore_jni.cc index 45c97f476..e74b94d3b 100644 --- a/coreapi/linphonecore_jni.cc +++ b/coreapi/linphonecore_jni.cc @@ -1523,9 +1523,8 @@ extern "C" void Java_org_linphone_core_LinphoneCoreImpl_setDefaultProxyConfig( J extern "C" jobject Java_org_linphone_core_LinphoneCoreImpl_getDefaultProxyConfig(JNIEnv* env ,jobject thiz ,jlong lc) { - LinphoneProxyConfig *config=0; - linphone_core_get_default_proxy((LinphoneCore*)lc,&config); - if(config != 0) { + LinphoneProxyConfig *config = linphone_core_get_default_proxy_config((LinphoneCore*)lc); + if (config != NULL) { jobject jproxy = getProxy(env,config,thiz); return jproxy; } else { diff --git a/coreapi/private.h b/coreapi/private.h index 530ee0730..98fdb93cf 100644 --- a/coreapi/private.h +++ b/coreapi/private.h @@ -992,7 +992,7 @@ struct _LinphoneCore UpnpContext *upnp; #endif //BUILD_UPNP belle_http_provider_t *http_provider; - belle_tls_verify_policy_t *http_verify_policy; + belle_tls_crypto_config_t *http_crypto_config; belle_http_request_listener_t *provisioning_http_listener; MSList *tones; LinphoneReason chat_deny_code; diff --git a/gtk/buddylookup.c b/gtk/buddylookup.c index 3251611d2..ef3044a1d 100644 --- a/gtk/buddylookup.c +++ b/gtk/buddylookup.c @@ -283,14 +283,15 @@ void linphone_gtk_add_buddy_from_database(GtkWidget *button){ char *name; char *addr; LinphoneFriend *lf; + LinphoneCore *lc = linphone_gtk_get_core(); int presence=linphone_gtk_get_ui_config_int("use_subscribe_notify",1); gtk_tree_model_get (model, &iter,LOOKUP_RESULT_SIP_URI , &uri,LOOKUP_RESULT_NAME, &name, -1); addr=g_strdup_printf("%s <%s>",name,uri); - lf=linphone_friend_new_with_address(addr); + lf=linphone_core_create_friend_with_address(lc, addr); linphone_friend_set_inc_subscribe_policy(lf,presence ? LinphoneSPAccept : LinphoneSPDeny); linphone_friend_send_subscribe(lf,presence); - linphone_core_add_friend(linphone_gtk_get_core(),lf); + linphone_core_add_friend(lc, lf); linphone_gtk_show_friends(); g_free(addr); g_free(uri); diff --git a/gtk/calllogs.c b/gtk/calllogs.c index b033de477..bd87a61dc 100644 --- a/gtk/calllogs.c +++ b/gtk/calllogs.c @@ -115,7 +115,7 @@ void linphone_gtk_call_log_add_contact(GtkWidget *w){ la = linphone_call_log_get_dir(cl)==LinphoneCallIncoming ? linphone_call_log_get_from(cl) : linphone_call_log_get_to(cl); if (la != NULL){ char *uri=linphone_address_as_string(la); - lf=linphone_friend_new_with_address(uri); + lf=linphone_core_create_friend_with_address(linphone_gtk_get_core(), uri); linphone_gtk_show_contact(lf, main_window); ms_free(uri); } diff --git a/gtk/chat.c b/gtk/chat.c index 2775a9dd3..492d029be 100644 --- a/gtk/chat.c +++ b/gtk/chat.c @@ -356,17 +356,18 @@ void display_history_message(GtkWidget *chat_view,MSList *messages,const Linphon static void linphone_gtk_chat_add_contact(const LinphoneAddress *addr){ LinphoneFriend *lf=NULL; + LinphoneCore *lc = linphone_gtk_get_core(); gboolean show_presence=FALSE; char *uri=linphone_address_as_string(addr); - lf=linphone_friend_new_with_address(uri); + lf=linphone_core_create_friend_with_address(lc, uri); ms_free(uri); linphone_friend_set_inc_subscribe_policy(lf,LinphoneSPWait); linphone_friend_send_subscribe(lf,show_presence); linphone_friend_set_address(lf,addr); - linphone_core_add_friend(linphone_gtk_get_core(),lf); + linphone_core_add_friend(lc, lf); linphone_gtk_show_friends(); } diff --git a/tester/call_tester.c b/tester/call_tester.c index 0bca22308..4ad8f5472 100644 --- a/tester/call_tester.c +++ b/tester/call_tester.c @@ -1521,7 +1521,8 @@ static void call_paused_resumed_with_video_base(bool_t sdp_200_ack vpol.automatically_initiate = TRUE; linphone_core_set_video_policy(pauline->lc, &vpol); - linphone_core_enable_video(pauline->lc, TRUE, TRUE); + linphone_core_enable_video_capture(pauline->lc, TRUE); + linphone_core_enable_video_display(pauline->lc, TRUE); BC_ASSERT_TRUE((call_ok=call(marie, pauline))); @@ -3771,12 +3772,15 @@ static void multiple_early_media(void) { pol.automatically_accept=1; pol.automatically_initiate=1; - linphone_core_enable_video(pauline->lc,TRUE,TRUE); + linphone_core_enable_video_capture(pauline->lc, TRUE); + linphone_core_enable_video_display(pauline->lc, TRUE); - linphone_core_enable_video(marie1->lc,TRUE,TRUE); + linphone_core_enable_video_capture(marie1->lc, TRUE); + linphone_core_enable_video_display(marie1->lc, TRUE); linphone_core_set_video_policy(marie1->lc,&pol); - linphone_core_enable_video(marie2->lc,TRUE,TRUE); + linphone_core_enable_video_capture(marie2->lc, TRUE); + linphone_core_enable_video_display(marie2->lc, TRUE); linphone_core_set_video_policy(marie2->lc,&pol); linphone_core_set_audio_port_range(marie2->lc,40200,40300); linphone_core_set_video_port_range(marie2->lc,40400,40500); @@ -3909,11 +3913,13 @@ static void accept_call_in_send_only_base(LinphoneCoreManager* pauline, Linphone pol.automatically_accept=1; pol.automatically_initiate=1; - linphone_core_enable_video(pauline->lc,TRUE,TRUE); + linphone_core_enable_video_capture(pauline->lc, TRUE); + linphone_core_enable_video_display(pauline->lc, TRUE); linphone_core_set_video_policy(pauline->lc,&pol); linphone_core_set_video_device(pauline->lc,liblinphone_tester_mire_id); - linphone_core_enable_video(marie->lc,TRUE,TRUE); + linphone_core_enable_video_capture(marie->lc, TRUE); + linphone_core_enable_video_display(marie->lc, TRUE); linphone_core_set_video_policy(marie->lc,&pol); linphone_core_set_video_device(marie->lc,liblinphone_tester_mire_id); @@ -4729,8 +4735,10 @@ static void audio_call_with_video_policy_enabled(void){ LinphoneVideoPolicy vpol; - linphone_core_enable_video(marie->lc, TRUE, TRUE); - linphone_core_enable_video(pauline->lc, TRUE, TRUE); + linphone_core_enable_video_capture(marie->lc, TRUE); + linphone_core_enable_video_display(marie->lc, TRUE); + linphone_core_enable_video_capture(pauline->lc, TRUE); + linphone_core_enable_video_display(pauline->lc, TRUE); vpol.automatically_accept = vpol.automatically_initiate = TRUE; linphone_core_set_video_policy(marie->lc, &vpol); vpol.automatically_accept = vpol.automatically_initiate = FALSE; @@ -4778,8 +4786,10 @@ static void classic_video_entry_phone_setup(void) { lcs = ms_list_append(lcs, caller_mgr->lc); lcs = ms_list_append(lcs, callee_mgr->lc); - linphone_core_enable_video(caller_mgr->lc, TRUE, TRUE); - linphone_core_enable_video(callee_mgr->lc, TRUE, TRUE); + linphone_core_enable_video_capture(caller_mgr->lc, TRUE); + linphone_core_enable_video_display(caller_mgr->lc, TRUE); + linphone_core_enable_video_capture(callee_mgr->lc, TRUE); + linphone_core_enable_video_display(callee_mgr->lc, TRUE); linphone_core_set_avpf_mode(caller_mgr->lc, LinphoneAVPFEnabled); linphone_core_set_avpf_mode(callee_mgr->lc, LinphoneAVPFEnabled); linphone_core_set_video_policy(caller_mgr->lc, &vpol); @@ -4943,8 +4953,10 @@ static void call_with_complex_late_offering(void){ LinphoneVideoPolicy vpol = {TRUE, TRUE}; bool_t call_ok; - linphone_core_enable_video(pauline->lc, TRUE, TRUE); - linphone_core_enable_video(marie->lc, TRUE, TRUE); + linphone_core_enable_video_capture(pauline->lc, TRUE); + linphone_core_enable_video_display(pauline->lc, TRUE); + linphone_core_enable_video_capture(marie->lc, TRUE); + linphone_core_enable_video_display(marie->lc, TRUE); linphone_core_set_video_policy(pauline->lc, &vpol); linphone_core_set_video_policy(marie->lc, &vpol); linphone_core_set_video_device(pauline->lc,liblinphone_tester_mire_id); diff --git a/tester/presence_tester.c b/tester/presence_tester.c index ce4c131e9..fae9aef60 100644 --- a/tester/presence_tester.c +++ b/tester/presence_tester.c @@ -274,7 +274,7 @@ static void simple_subscribe(void) { static void unsubscribe_while_subscribing(void) { LinphoneCoreManager* marie = linphone_core_manager_new( "marie_rc"); - LinphoneFriend* friend = linphone_friend_new_with_address("sip:toto@git.linphone.org"); /*any unexisting address*/ + LinphoneFriend* friend = linphone_core_create_friend_with_address(marie->lc, "sip:toto@git.linphone.org"); /*any unexisting address*/ linphone_friend_edit(friend); linphone_friend_enable_subscribes(friend,TRUE); linphone_friend_done(friend); diff --git a/tester/register_tester.c b/tester/register_tester.c index 4c062af9e..edcaf89d4 100644 --- a/tester/register_tester.c +++ b/tester/register_tester.c @@ -459,7 +459,7 @@ static void authenticated_register_with_wrong_credentials_with_params_base(const /*check the detailed error info */ if (!user_agent || strcmp(user_agent,"tester-no-403")!=0){ LinphoneProxyConfig *cfg=NULL; - linphone_core_get_default_proxy(lcm->lc,&cfg); + cfg = linphone_core_get_default_proxy_config(lcm->lc); BC_ASSERT_PTR_NOT_NULL(cfg); if (cfg){ const LinphoneErrorInfo *ei=linphone_proxy_config_get_error_info(cfg); @@ -488,7 +488,7 @@ static void authenticated_register_with_wrong_credentials_2(void) { authenticated_register_with_wrong_credentials_with_params_base(NULL,lcm); - linphone_core_get_default_proxy(lcm->lc,&proxy); + proxy = linphone_core_get_default_proxy_config(lcm->lc); /*Make sure registration attempts are stopped*/ linphone_proxy_config_edit(proxy); linphone_proxy_config_enable_register(proxy,FALSE); @@ -593,7 +593,7 @@ static void proxy_transport_change(void){ register_with_refresh_base(lcm->lc,FALSE,auth_domain,NULL); - linphone_core_get_default_proxy(lcm->lc,&proxy_config); + proxy_config = linphone_core_get_default_proxy_config(lcm->lc); reset_counters(counters); /*clear stats*/ linphone_proxy_config_edit(proxy_config); @@ -630,7 +630,7 @@ static void proxy_transport_change_with_wrong_port(void) { register_with_refresh_base_3(lcm->lc, FALSE, auth_domain, "sip2.linphone.org:5987", 0,transport,LinphoneRegistrationProgress); - linphone_core_get_default_proxy(lcm->lc,&proxy_config); + proxy_config = linphone_core_get_default_proxy_config(lcm->lc); linphone_proxy_config_edit(proxy_config); BC_ASSERT_FALSE(wait_for_until(lcm->lc,lcm->lc,&counters->number_of_LinphoneRegistrationCleared,1,3000)); @@ -661,7 +661,7 @@ static void proxy_transport_change_with_wrong_port_givin_up(void) { register_with_refresh_base_3(lcm->lc, FALSE, auth_domain, "sip2.linphone.org:5987", 0,transport,LinphoneRegistrationProgress); - linphone_core_get_default_proxy(lcm->lc,&proxy_config); + proxy_config = linphone_core_get_default_proxy_config(lcm->lc); linphone_proxy_config_edit(proxy_config); BC_ASSERT_FALSE(wait_for_until(lcm->lc,lcm->lc,&counters->number_of_LinphoneRegistrationCleared,1,3000)); @@ -839,7 +839,7 @@ static void tls_with_non_tls_server(void){ lcm=linphone_core_manager_new2( "marie_rc", 0); lc=lcm->lc; sal_set_transport_timeout(lc->sal,3000); - linphone_core_get_default_proxy(lc,&proxy_cfg); + proxy_cfg = linphone_core_get_default_proxy_config(lc); linphone_proxy_config_edit(proxy_cfg); addr=linphone_address_new(linphone_proxy_config_get_addr(proxy_cfg)); snprintf(tmp,sizeof(tmp),"sip:%s:%i;transport=tls" ,linphone_address_get_domain(addr) diff --git a/tester/vcard_tester.c b/tester/vcard_tester.c index 52eaa8f25..496fb3604 100644 --- a/tester/vcard_tester.c +++ b/tester/vcard_tester.c @@ -131,7 +131,7 @@ static void linphone_vcard_update_existing_friends_test(void) { static void friends_if_no_db_set(void) { LinphoneCoreManager* manager = linphone_core_manager_new2("empty_rc", FALSE); - LinphoneFriend *lf = linphone_friend_new(); + LinphoneFriend *lf = linphone_core_create_friend(manager->lc); LinphoneAddress *addr = linphone_address_new("sip:sylvain@sip.linphone.org"); const MSList *friends = NULL; LinphoneFriendList *lfl = linphone_core_create_friend_list(manager->lc); @@ -359,7 +359,7 @@ static void carddav_sync(void) { static void carddav_sync_2(void) { LinphoneCoreManager *manager = linphone_core_manager_new2("carddav_rc", FALSE); LinphoneCardDAVStats *stats = (LinphoneCardDAVStats *)ms_new0(LinphoneCardDAVStats, 1); - LinphoneFriend *lf = linphone_friend_new_with_address("\"Sylvain\" "); + LinphoneFriend *lf = linphone_core_create_friend_with_address(manager->lc, "\"Sylvain\" "); char *friends_db = create_filepath(bc_tester_get_writable_dir_prefix(), "friends", "db"); LinphoneFriendList *lfl = linphone_core_create_friend_list(manager->lc); LinphoneCardDavContext *c = NULL; diff --git a/tester/video_tester.c b/tester/video_tester.c index ca5022e96..35aa44228 100644 --- a/tester/video_tester.c +++ b/tester/video_tester.c @@ -420,10 +420,13 @@ static void forked_outgoing_early_media_video_call_with_inactive_audio_test(void pol.automatically_accept = 1; pol.automatically_initiate = 1; - linphone_core_enable_video(pauline->lc, TRUE, TRUE); - linphone_core_enable_video(marie1->lc, TRUE, TRUE); + linphone_core_enable_video_capture(pauline->lc, TRUE); + linphone_core_enable_video_display(pauline->lc, TRUE); + linphone_core_enable_video_capture(marie1->lc, TRUE); + linphone_core_enable_video_display(marie1->lc, TRUE); linphone_core_set_video_policy(marie1->lc, &pol); - linphone_core_enable_video(marie2->lc, TRUE, TRUE); + linphone_core_enable_video_capture(marie2->lc, TRUE); + linphone_core_enable_video_display(marie2->lc, TRUE); linphone_core_set_video_policy(marie2->lc, &pol); linphone_core_set_audio_port_range(marie2->lc, 40200, 40300); linphone_core_set_video_port_range(marie2->lc, 40400, 40500);