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

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
belle_sip_request_t* req;
char content_type_raw[256];
size_t content_length = msg?strlen(msg):0;
time_t curtime=time(NULL);
time_t curtime = ms_time(NULL);
uint8_t *multipartEncryptedMessage = NULL;
const char *body;
int retval;
......@@ -344,10 +344,13 @@ void linphone_core_manager_start(LinphoneCoreManager *mgr, int check_for_proxies
int proxy_count;
/*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){ /**/
/*this is to prevent registration to go on*/
linphone_core_set_network_reachable(mgr->lc, FALSE);
if (proxy_count){
#define REGISTER_TIMEOUT 20 /* seconds */
......@@ -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*/
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) {
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