Add warning when trying to set uPnP as firewall policy and uPnP is not available

This commit is contained in:
Yann Diorcet 2013-02-13 12:20:45 +01:00
parent ee6366003f
commit 3610297d37

View file

@ -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))