From 67faeff9a8c2031c0ff27e6b13227fc05653b85f Mon Sep 17 00:00:00 2001 From: Simon Morlat <simon.morlat@linphone.org> Date: Thu, 20 Mar 2014 10:36:56 +0100 Subject: [PATCH] fix proxy config selection: use default proxy config if no matching proxy config is found for a given destination. --- coreapi/linphonecore.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index c4fffd0303..38093e7c81 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -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; } -- GitLab