Commit 4c7c3de2 authored by jehan's avatar jehan

clear proxy config before loading config from config.

parent a50abfbb
Pipeline #353 failed with stage
in 0 seconds
...@@ -1449,6 +1449,13 @@ static void sip_config_read(LinphoneCore *lc) { ...@@ -1449,6 +1449,13 @@ static void sip_config_read(LinphoneCore *lc) {
tmp=lp_config_get_int(lc->config,"sip","delayed_timeout",4); tmp=lp_config_get_int(lc->config,"sip","delayed_timeout",4);
linphone_core_set_delayed_timeout(lc,tmp); linphone_core_set_delayed_timeout(lc,tmp);
/*In case of remote provisionning, function sip_config_read is initialy called in core_init, then in state ConfiguringSuccessfull*/
/*Accordingly, to avoid proxy_config to be added twice, it is mandatory to reset proxy config list from LinphoneCore*/
/*We assume, lc->config contains an accurate list of proxy_config, so no need to keep it from LinphoneCore */
/*Consequence in case of remote provisionning, linphone_core_add_proxy function should not be called before state GlobalOn*/
linphone_core_clear_proxy_config(lc);
/* get proxies config */ /* get proxies config */
for(i=0;; i++){ for(i=0;; i++){
LinphoneProxyConfig *cfg=linphone_proxy_config_new_from_config_file(lc,i); LinphoneProxyConfig *cfg=linphone_proxy_config_new_from_config_file(lc,i);
......
...@@ -45,6 +45,8 @@ static void remote_provisioning_http(void) { ...@@ -45,6 +45,8 @@ static void remote_provisioning_http(void) {
LinphoneCoreManager* marie = linphone_core_manager_new2("marie_remote_rc", FALSE); LinphoneCoreManager* marie = linphone_core_manager_new2("marie_remote_rc", FALSE);
BC_ASSERT_TRUE(wait_for(marie->lc,NULL,&marie->stat.number_of_LinphoneConfiguringSuccessful,1)); BC_ASSERT_TRUE(wait_for(marie->lc,NULL,&marie->stat.number_of_LinphoneConfiguringSuccessful,1));
BC_ASSERT_TRUE(wait_for(marie->lc,NULL,&marie->stat.number_of_LinphoneRegistrationOk,1)); BC_ASSERT_TRUE(wait_for(marie->lc,NULL,&marie->stat.number_of_LinphoneRegistrationOk,1));
/*make sure proxy config is not added in double, one time at core init, next time at configuring successfull*/
BC_ASSERT_EQUAL(bctbx_list_size(linphone_core_get_proxy_config_list(marie->lc)), 1, int,"%i");
linphone_core_manager_destroy(marie); linphone_core_manager_destroy(marie);
} }
......
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