Commit 4644ade0 authored by Simon Morlat's avatar Simon Morlat
Browse files

fix regression in some tests not wanting to register within...

fix regression in some tests not wanting to register within linphone_core_manager_new(), due to register going out while stun resolution is in progress.
parent fd74e2f1
...@@ -244,7 +244,7 @@ int sal_message_send(SalOp *op, const char *from, const char *to, const char* co ...@@ -244,7 +244,7 @@ int sal_message_send(SalOp *op, const char *from, const char *to, const char* co
belle_sip_request_t* req; belle_sip_request_t* req;
char content_type_raw[256]; char content_type_raw[256];
size_t content_length = msg?strlen(msg):0; size_t content_length = msg?strlen(msg):0;
time_t curtime=time(NULL); time_t curtime = ms_time(NULL);
uint8_t *multipartEncryptedMessage = NULL; uint8_t *multipartEncryptedMessage = NULL;
const char *body; const char *body;
int retval; int retval;
......
...@@ -344,10 +344,13 @@ void linphone_core_manager_start(LinphoneCoreManager *mgr, int check_for_proxies ...@@ -344,10 +344,13 @@ void linphone_core_manager_start(LinphoneCoreManager *mgr, int check_for_proxies
int proxy_count; int proxy_count;
/*BC_ASSERT_EQUAL(ms_list_size(linphone_core_get_proxy_config_list(lc)),proxy_count, int, "%d");*/ /*BC_ASSERT_EQUAL(ms_list_size(linphone_core_get_proxy_config_list(lc)),proxy_count, int, "%d");*/
if (check_for_proxies) /**/ if (check_for_proxies){ /**/
proxy_count=ms_list_size(linphone_core_get_proxy_config_list(mgr->lc)); proxy_count=ms_list_size(linphone_core_get_proxy_config_list(mgr->lc));
else }else{
proxy_count=0; proxy_count=0;
/*this is to prevent registration to go on*/
linphone_core_set_network_reachable(mgr->lc, FALSE);
}
if (proxy_count){ if (proxy_count){
#define REGISTER_TIMEOUT 20 /* seconds */ #define REGISTER_TIMEOUT 20 /* seconds */
...@@ -370,6 +373,10 @@ void linphone_core_manager_start(LinphoneCoreManager *mgr, int check_for_proxies ...@@ -370,6 +373,10 @@ void linphone_core_manager_start(LinphoneCoreManager *mgr, int check_for_proxies
/*before we go, ensure that the stun server is resolved, otherwise all ice related test will fail*/ /*before we go, ensure that the stun server is resolved, otherwise all ice related test will fail*/
BC_ASSERT_TRUE(wait_for_stun_resolution(mgr)); BC_ASSERT_TRUE(wait_for_stun_resolution(mgr));
} }
if (!check_for_proxies){
/*now that stun server resolution is done, we can start registering*/
linphone_core_set_network_reachable(mgr->lc, TRUE);
}
} }
LinphoneCoreManager* linphone_core_manager_new( const char* rc_file) { LinphoneCoreManager* linphone_core_manager_new( const char* rc_file) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment