Allow for longer timeout in register

This commit is contained in:
Guillaume BIENKOWSKI 2014-12-15 15:55:50 +01:00
parent da9cffd5fe
commit bb6123477b

View file

@ -279,8 +279,14 @@ LinphoneCoreManager* linphone_core_manager_new2(const char* rc_file, int check_f
linphone_core_set_play_file(mgr->lc,hellopath);
}
if (proxy_count)
wait_for_until(mgr->lc,NULL,&mgr->stat.number_of_LinphoneRegistrationOk,proxy_count,5000*proxy_count);
if (proxy_count){
#define REGISTER_TIMEOUT 20 /* seconds */
int success = wait_for_until(mgr->lc,NULL,&mgr->stat.number_of_LinphoneRegistrationOk,
proxy_count,(REGISTER_TIMEOUT * 1000 * proxy_count);
if( !success ){
ms_error("Did not register after %d seconds for %d proxies", REGISTER_TIMEOUT, proxy_count);
}
}
CU_ASSERT_EQUAL(mgr->stat.number_of_LinphoneRegistrationOk,proxy_count);
enable_codec(mgr->lc,"PCMU",8000);