]> sjero.net Git - linphone/blobdiff - coreapi/proxy.c
Fix proxy update when using uPnP
[linphone] / coreapi / proxy.c
index 75930adb14a52b2e5422fefb19975240e3381680..5546102ba433a3a7ffd9767ddb82aad3715ee832 100644 (file)
@@ -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