Commit df58cddb authored by Simon Morlat's avatar Simon Morlat
Browse files

clean proxy config in linphone_core_destroy()

parent a08e2635
......@@ -5521,15 +5521,11 @@ void sip_config_uninit(LinphoneCore *lc)
}
if (i>=20) ms_warning("Cannot complete unregistration, giving up");
}
ms_list_for_each(config->proxies,(void (*)(void*)) linphone_proxy_config_destroy);
ms_list_free(config->proxies);
config->proxies=NULL;
config->proxies=ms_list_free_with_data(config->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 */
ms_list_for_each(lc->auth_info,(void (*)(void*))linphone_auth_info_destroy);
ms_list_free(lc->auth_info);
lc->auth_info=NULL;
lc->auth_info=ms_list_free_with_data(lc->auth_info,(void (*)(void*))linphone_auth_info_destroy);
/*now that we are unregisted, we no longer need the tunnel.*/
#ifdef TUNNEL_ENABLED
......
......@@ -300,6 +300,7 @@ int linphone_proxy_config_send_publish(LinphoneProxyConfig *cfg, LinphonePresenc
void linphone_proxy_config_set_state(LinphoneProxyConfig *cfg, LinphoneRegistrationState rstate, const char *message);
void linphone_proxy_config_stop_refreshing(LinphoneProxyConfig *obj);
void linphone_proxy_config_write_all_to_config_file(LinphoneCore *lc);
void _linphone_proxy_config_release(LinphoneProxyConfig *cfg);
/*
* returns service route as defined in as defined by rfc3608, might be a list instead of just one.
* Can be NULL
......
......@@ -188,6 +188,11 @@ void linphone_proxy_config_destroy(LinphoneProxyConfig *cfg) {
belle_sip_object_unref(cfg);
}
void _linphone_proxy_config_release(LinphoneProxyConfig *cfg) {
_linphone_proxy_config_release_ops(cfg);
belle_sip_object_unref(cfg);
}
LinphoneProxyConfig *linphone_proxy_config_ref(LinphoneProxyConfig *cfg) {
belle_sip_object_ref(cfg);
return cfg;
......
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