From abab667da569e843ed2fec0d5a62afa4dc6cc438 Mon Sep 17 00:00:00 2001 From: Ghislain MARY Date: Tue, 7 Jun 2016 15:50:24 +0200 Subject: [PATCH] Fix bug in migration from firewall_policy to nat_policy. Even after creating the nat_policy, the settings of the firewall_policy could still be used resulting in unexpected behavior. --- coreapi/linphonecore.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/coreapi/linphonecore.c b/coreapi/linphonecore.c index 2684e327a..4a57af379 100644 --- a/coreapi/linphonecore.c +++ b/coreapi/linphonecore.c @@ -5241,6 +5241,9 @@ void linphone_core_set_firewall_policy(LinphoneCore *lc, LinphoneFirewallPolicy } linphone_core_set_nat_policy(lc, nat_policy); linphone_nat_policy_unref(nat_policy); + + /* Ensure that the firewall policy is cleared in the config because it has been replaced by the nat_policy. */ + lp_config_set_string(lc->config, "net", "firewall_policy", NULL); } LinphoneFirewallPolicy linphone_core_get_firewall_policy(const LinphoneCore *lc) {