fix proxy config selection: use default proxy config if no matching proxy config is found for a given destination.

This commit is contained in:
Simon Morlat 2014-03-20 10:36:56 +01:00
parent 06c9f94113
commit 67faeff9a8

View file

@ -2526,7 +2526,6 @@ LinphoneProxyConfig * linphone_core_lookup_known_proxy(LinphoneCore *lc, const L
for (elem=linphone_core_get_proxy_config_list(lc);elem!=NULL;elem=elem->next){
LinphoneProxyConfig *cfg=(LinphoneProxyConfig*)elem->data;
const char *domain=linphone_proxy_config_get_domain(cfg);
/* ms_warning("Checking %s / %s %s", domain, linphone_address_get_domain(uri), linphone_proxy_config_get_route(cfg)); */
if (domain!=NULL && strcmp(domain,linphone_address_get_domain(uri))==0){
if (linphone_proxy_config_register_enabled(cfg)) {
found_cfg=cfg;
@ -2540,7 +2539,7 @@ end:
if (!found_cfg && found_noreg_cfg) found_cfg = found_noreg_cfg;
if (found_cfg && found_cfg!=default_cfg){
ms_debug("Overriding default proxy setting for this call/message/subscribe operation.");
}
}else if (!found_cfg) found_cfg=default_cfg; /*when no matching proxy config is found, use the default proxy config*/
return found_cfg;
}