diff --git a/coreapi/bellesip_sal/sal_impl.c b/coreapi/bellesip_sal/sal_impl.c index 30e69012d..dce0bb184 100644 --- a/coreapi/bellesip_sal/sal_impl.c +++ b/coreapi/bellesip_sal/sal_impl.c @@ -722,6 +722,13 @@ void sal_set_dns_timeout(Sal* sal,int timeout) { int sal_get_dns_timeout(const Sal* sal) { return belle_sip_stack_get_dns_timeout(sal->stack); } + +void sal_set_transport_timeout(Sal* sal,int timeout) { + belle_sip_stack_set_transport_timeout(sal->stack, timeout); +} +int sal_get_transport_timeout(const Sal* sal) { + return belle_sip_stack_get_transport_timeout(sal->stack); +} void sal_enable_dns_srv(Sal *sal, bool_t enable) { belle_sip_stack_enable_dns_srv(sal->stack, (unsigned char)enable); } diff --git a/include/sal/sal.h b/include/sal/sal.h index 47402719e..5c93786a9 100644 --- a/include/sal/sal.h +++ b/include/sal/sal.h @@ -683,6 +683,8 @@ bool_t sal_nat_helper_enabled(Sal *sal); LINPHONE_PUBLIC void sal_set_dns_timeout(Sal* sal,int timeout); LINPHONE_PUBLIC int sal_get_dns_timeout(const Sal* sal); +LINPHONE_PUBLIC void sal_set_transport_timeout(Sal* sal,int timeout); +LINPHONE_PUBLIC int sal_get_transport_timeout(const Sal* sal); LINPHONE_PUBLIC void sal_enable_dns_srv(Sal *sal, bool_t enable); LINPHONE_PUBLIC bool_t sal_dns_srv_enabled(const Sal *sal); LINPHONE_PUBLIC void sal_set_dns_user_hosts_file(Sal *sal, const char *hosts_file); diff --git a/tester/register_tester.c b/tester/register_tester.c index 51c092a51..b090c9d1b 100644 --- a/tester/register_tester.c +++ b/tester/register_tester.c @@ -573,6 +573,7 @@ static void tls_certificate_failure(){ linphone_core_destroy(mgr->lc); } +/*the purpose of this test is to check that will not block the proxy config during SSL handshake for entire life in case of mistaken configuration*/ static void tls_with_non_tls_server(){ LinphoneCoreManager *mgr; LinphoneProxyConfig* proxy_cfg; @@ -582,6 +583,7 @@ static void tls_with_non_tls_server(){ mgr=linphone_core_manager_new2( "marie_rc", 0); lc=mgr->lc; + sal_set_transport_timeout(lc->sal,3000); linphone_core_get_default_proxy(lc,&proxy_cfg); linphone_proxy_config_edit(proxy_cfg); addr=linphone_address_new(linphone_proxy_config_get_addr(proxy_cfg)); @@ -590,9 +592,7 @@ static void tls_with_non_tls_server(){ linphone_proxy_config_set_server_addr(proxy_cfg,tmp); linphone_proxy_config_done(proxy_cfg); linphone_address_destroy(addr); - /* FIXME http://git.linphone.org/mantis/view.php?id=758 - CU_ASSERT_TRUE(wait_for(lc,lc,&mgr->stat.number_of_LinphoneRegistrationFailed,1)); - */ + CU_ASSERT_TRUE(wait_for_until(lc,lc,&mgr->stat.number_of_LinphoneRegistrationFailed,1,5000)); linphone_core_manager_destroy(mgr); }