Commit cf37868b authored by Ronan's avatar Ronan

fix(c-core): clean default proxy before core

parent ae06ed6d
......@@ -2320,7 +2320,7 @@ void linphone_core_start (LinphoneCore *lc) {
lp_config_set_string(lc->config,"misc","uuid",tmp);
}else if (strcmp(uuid,"0")!=0) /*to allow to disable sip.instance*/
lc->sal->set_uuid(uuid);
if (lc->sal->get_root_ca()) {
belle_tls_crypto_config_set_root_ca(lc->http_crypto_config, lc->sal->get_root_ca());
belle_http_provider_set_tls_crypto_config(lc->http_provider, lc->http_crypto_config);
......@@ -5812,6 +5812,22 @@ void sip_config_uninit(LinphoneCore *lc)
}
if (i>=20) ms_warning("Cannot complete unregistration, giving up");
}
elem = config->proxies;
config->proxies=NULL; /*to make sure proxies cannot be referenced during deletion*/
bctbx_list_free_with_data(elem,(void (*)(void*)) _linphone_proxy_config_release);
config->deleted_proxies=bctbx_list_free_with_data(config->deleted_proxies,(void (*)(void*)) _linphone_proxy_config_release);
/*no longuer need to write proxy config if not changed linphone_proxy_config_write_to_config_file(lc->config,NULL,i);*/ /*mark the end */
lc->auth_info=bctbx_list_free_with_data(lc->auth_info,(void (*)(void*))linphone_auth_info_unref);
lc->default_proxy = NULL;
if (lc->vcard_context) {
linphone_vcard_context_destroy(lc->vcard_context);
}
lc->sal->reset_transports();
lc->sal->unlisten_ports(); /*to make sure no new messages are received*/
if (lc->http_provider) {
......@@ -5836,19 +5852,6 @@ void sip_config_uninit(LinphoneCore *lc)
delete lc->sal;
lc->sal=NULL;
elem = config->proxies;
config->proxies=NULL; /*to make sure proxies cannot be refferenced during deletion*/
bctbx_list_free_with_data(elem,(void (*)(void*)) _linphone_proxy_config_release);
config->deleted_proxies=bctbx_list_free_with_data(config->deleted_proxies,(void (*)(void*)) _linphone_proxy_config_release);
/*no longuer need to write proxy config if not changedlinphone_proxy_config_write_to_config_file(lc->config,NULL,i);*/ /*mark the end */
lc->auth_info=bctbx_list_free_with_data(lc->auth_info,(void (*)(void*))linphone_auth_info_unref);
if (lc->vcard_context) {
linphone_vcard_context_destroy(lc->vcard_context);
}
if (lc->sip_conf.guessed_contact)
ms_free(lc->sip_conf.guessed_contact);
......
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