Commit 69750c29 authored by Simon Morlat's avatar Simon Morlat
Browse files

fix refcount of proxy config

parent b011dd62
......@@ -725,6 +725,7 @@ static void sip_config_read(LinphoneCore *lc)
LinphoneProxyConfig *cfg=linphone_proxy_config_new_from_config_file(lc,i);
if (cfg!=NULL){
linphone_core_add_proxy_config(lc,cfg);
linphone_proxy_config_unref(cfg);
}else{
break;
}
......@@ -2166,7 +2167,7 @@ static void proxy_update(LinphoneCore *lc){
lc->sip_conf.deleted_proxies =ms_list_remove_link(lc->sip_conf.deleted_proxies,elem);
ms_message("Proxy config for [%s] is definitely removed from core.",linphone_proxy_config_get_addr(cfg));
_linphone_proxy_config_release_ops(cfg);
linphone_proxy_config_destroy(cfg);
linphone_proxy_config_unref(cfg);
}
}
}
......
......@@ -1137,7 +1137,7 @@ int linphone_core_add_proxy_config(LinphoneCore *lc, LinphoneProxyConfig *cfg){
ms_warning("ProxyConfig already entered, ignored.");
return 0;
}
lc->sip_conf.proxies=ms_list_append(lc->sip_conf.proxies,(void *)cfg);
lc->sip_conf.proxies=ms_list_append(lc->sip_conf.proxies,(void *)linphone_proxy_config_ref(cfg));
linphone_proxy_config_apply(cfg,lc);
return 0;
}
......
mediastreamer2 @ 90c0ea29
Subproject commit a003a1cc349530dfffa937e16cb06a0c8b4632c8
Subproject commit 90c0ea293a934b3b23a3c6b70f8abe5db545a3d5
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