From 2698f84415009f2d0c245db2ae4da5c69889c928 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Mon, 24 Oct 2016 15:37:53 +0200 Subject: [PATCH] fix vcard compilation --- tester/register_tester.c | 26 ++++++++++++++++++++++++++ tester/vcard_tester.c | 6 ++++-- 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/tester/register_tester.c b/tester/register_tester.c index ed32e2b80..cc7bb74f5 100644 --- a/tester/register_tester.c +++ b/tester/register_tester.c @@ -601,6 +601,31 @@ static void transport_dont_bind(void){ linphone_core_manager_destroy(pauline); } +static void transport_busy(void){ + LinphoneCoreManager *pauline = linphone_core_manager_new("pauline_tcp_rc"); + LCSipTransports tr; + + memset(&tr, 0, sizeof(tr)); + tr.udp_port = 5070; + tr.tcp_port = 5070; + tr.tls_port = 5071; + + linphone_core_set_sip_transports(pauline->lc, &tr); + + { + LinphoneCoreManager *marie = linphone_core_manager_new("marie_rc"); + linphone_core_set_sip_transports(marie->lc, &tr); + memset(&tr, 0, sizeof(tr)); + linphone_core_get_sip_transports_used(pauline->lc, &tr); + BC_ASSERT_EQUAL(tr.udp_port, 0, int, "%i"); + BC_ASSERT_EQUAL(tr.tcp_port, 0, int, "%i"); + BC_ASSERT_EQUAL(tr.tls_port, 0, int, "%i"); + linphone_core_manager_destroy(marie); + } + + linphone_core_manager_destroy(pauline); +} + static void proxy_transport_change(void){ LinphoneCoreManager* lcm = create_lcm(); stats* counters = &lcm->stat; @@ -1144,6 +1169,7 @@ test_t register_tests[] = { TEST_NO_TAG("Multi account", multiple_proxy), TEST_NO_TAG("Transport changes", transport_change), TEST_NO_TAG("Transport configured with dontbind option", transport_dont_bind), + TEST_NO_TAG("Transport busy", transport_busy), TEST_NO_TAG("Proxy transport changes", proxy_transport_change), TEST_NO_TAG("Proxy transport changes with wrong address at first", proxy_transport_change_with_wrong_port), TEST_NO_TAG("Proxy transport changes with wrong address, giving up",proxy_transport_change_with_wrong_port_givin_up), diff --git a/tester/vcard_tester.c b/tester/vcard_tester.c index fdd7b6c19..3bbff9141 100644 --- a/tester/vcard_tester.c +++ b/tester/vcard_tester.c @@ -16,10 +16,12 @@ along with this program. If not, see . */ -#ifdef VCARD_ENABLED - #include "linphonecore.h" #include "private.h" + +#ifdef VCARD_ENABLED + + #include "liblinphone_tester.h" #include "carddav.h"