]> sjero.net Git - linphone/blobdiff - coreapi/proxy.c
Fix loop in upnp context release
[linphone] / coreapi / proxy.c
index bb6c8ec6a0100384dcb62d449e0cccca7e6d8078..fb650c852133e4f33ed7e206b0c0adea36a7e63e 100644 (file)
@@ -1082,7 +1082,8 @@ void linphone_proxy_config_update(LinphoneProxyConfig *cfg){
                if (cfg->type && cfg->ssctx==NULL){
                        linphone_proxy_config_activate_sip_setup(cfg);
                }
-               if (!lc->sip_conf.register_only_when_network_is_up || lc->network_reachable)
+               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_proxy_config_register(cfg);
                if (cfg->publish && cfg->publish_op==NULL){
                        linphone_proxy_config_send_publish(cfg,lc->presence_mode);