From 3ba2e1af0ca1658031b3c14833bf43c97a778e40 Mon Sep 17 00:00:00 2001 From: Yann Diorcet Date: Mon, 25 Feb 2013 11:32:05 +0100 Subject: [PATCH] Fix proxy update when using uPnP --- coreapi/proxy.c | 4 ++-- coreapi/upnp.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/coreapi/proxy.c b/coreapi/proxy.c index 75930adb..5546102b 100644 --- a/coreapi/proxy.c +++ b/coreapi/proxy.c @@ -1100,8 +1100,8 @@ void linphone_proxy_config_update(LinphoneProxyConfig *cfg){ switch(linphone_core_get_firewall_policy(lc)) { case LinphonePolicyUseUpnp: #ifdef BUILD_UPNP - if(!lc->sip_conf.register_only_when_upnp_is_ok || - (lc->upnp != NULL && !linphone_upnp_context_is_ready_for_register(lc->upnp))) { + if(lc->sip_conf.register_only_when_upnp_is_ok && + (lc->upnp == NULL || !linphone_upnp_context_is_ready_for_register(lc->upnp))) { break; } #endif //BUILD_UPNP diff --git a/coreapi/upnp.c b/coreapi/upnp.c index 400cc7e2..09287657 100644 --- a/coreapi/upnp.c +++ b/coreapi/upnp.c @@ -881,6 +881,8 @@ void linphone_upnp_update_proxy(UpnpContext* lupnp, bool_t force) { // Only reset ithe registration if we require that upnp should be ok if(lupnp->lc->sip_conf.register_only_when_upnp_is_ok) { linphone_proxy_config_set_state(cfg, LinphoneRegistrationNone, "Registration impossible (uPnP not ready)"); + } else { + cfg->commit=TRUE; } } else { cfg->commit=TRUE; -- 2.39.2