re-enable test "TLS with non tls server" (works with lastest belle-sip)

This commit is contained in:
Simon Morlat 2014-02-07 18:44:39 +01:00
parent a60d181bab
commit a96c066572
3 changed files with 12 additions and 3 deletions

View file

@ -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);
}

View file

@ -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);

View file

@ -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);
}