[asterisk-commits] config.c: Fix #include after [section](+). (asterisk[11])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Oct 16 10:35:54 CDT 2015


Matt Jordan has submitted this change and it was merged.

Change subject: config.c: Fix #include after [section](+).
......................................................................


config.c: Fix #include after [section](+).

An #include right after a [section](+) would associate any variable
assignments before a new section in the #include with the wrong section.

* Fix section association by setting the current section to the appended
section.

* Fix '+' and '!' section flag interaction corner case depending upon
which flag came first.  If the '!' came first then it would be ignored.
If the '!' came after then it would affect the appended section.  The '!'
will now no longer be ignored.

ASTERISK-25461 #close
Reported by: Sean Pimental

Change-Id: Ic9d3191c8758048e2cbce6432f854b32531731c3
---
M main/config.c
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Kevin Harwell: Looks good to me, but someone else must approve
  Anonymous Coward #1000019: Verified
  Matt Jordan: Looks good to me, approved



diff --git a/main/config.c b/main/config.c
index c49f82c..acbf08b 100644
--- a/main/config.c
+++ b/main/config.c
@@ -1443,6 +1443,8 @@
 						return -1;
 					}
 					if (newcat) {
+						ast_config_set_current_category(cfg, *cat);
+						(*cat)->ignored |= newcat->ignored;
 						move_variables(newcat, *cat);
 						ast_category_destroy(newcat);
 						newcat = NULL;

-- 
To view, visit https://gerrit.asterisk.org/1419
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic9d3191c8758048e2cbce6432f854b32531731c3
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 11
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>



More information about the asterisk-commits mailing list