From 7545582ab8286d1a533a23e8dbc2dca6f932c8c9 Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Wed, 13 Feb 2013 16:28:20 +0100 Subject: [PATCH] only check upnp state if upnp is configured --- coreapi/proxy.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/coreapi/proxy.c b/coreapi/proxy.c index 4f9bbb6ba..d57f32cae 100644 --- a/coreapi/proxy.c +++ b/coreapi/proxy.c @@ -1087,7 +1087,9 @@ void linphone_proxy_config_update(LinphoneProxyConfig *cfg){ linphone_proxy_config_activate_sip_setup(cfg); } if ((!lc->sip_conf.register_only_when_network_is_up || lc->network_reachable) && - (!lc->sip_conf.register_only_when_upnp_is_ok || linphone_core_get_upnp_state(lc) == LinphoneUpnpStateOk)) + (linphone_core_get_firewall_policy(lc)!=LinphonePolicyUseUpnp + || !lc->sip_conf.register_only_when_upnp_is_ok + || linphone_core_get_upnp_state(lc) == LinphoneUpnpStateOk)) linphone_proxy_config_register(cfg); if (cfg->publish && cfg->publish_op==NULL){ linphone_proxy_config_send_publish(cfg,lc->presence_mode);