From: Yann Diorcet Date: Wed, 13 Feb 2013 11:20:45 +0000 (+0100) Subject: Add warning when trying to set uPnP as firewall policy and uPnP is not available X-Git-Url: http://sjero.net/git/?p=linphone;a=commitdiff_plain;h=3610297d376e91f14a12bed25c737dacef317ece Add warning when trying to set uPnP as firewall policy and uPnP is not available --- diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 1be92ef3..1cd6436f 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -4206,6 +4206,12 @@ const char *linphone_core_get_nat_address_resolved(LinphoneCore *lc) } void linphone_core_set_firewall_policy(LinphoneCore *lc, LinphoneFirewallPolicy pol){ +#ifndef BUILD_UPNP + if(pol == LinphonePolicyUseUpnp) { + ms_warning("UPNP is not available, reset firewall policy to no firewall"); + pol = LinphonePolicyNoFirewall; + } +#endif //BUILD_UPNP lc->net_conf.firewall_policy=pol; if (lc->sip_conf.contact) update_primary_contact(lc); if (linphone_core_ready(lc))