diff options
author | Richard Mudgett <rmudgett@digium.com> | 2015-10-12 11:21:55 -0500 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2015-10-12 13:04:43 -0500 |
commit | 8d31d2526bb6e37d5e6f91381482074d94957b01 (patch) | |
tree | 5cbeff13460a108ad29f20459e2e0d1a2e681858 /main/config.c | |
parent | 1c799b1f1ecc37b7fb39dd205a35720e16fe37d7 (diff) |
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
Diffstat (limited to 'main/config.c')
-rw-r--r-- | main/config.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/main/config.c b/main/config.c index 7484b66ba..fd03c906f 100644 --- a/main/config.c +++ b/main/config.c @@ -1696,6 +1696,8 @@ static int process_text_line(struct ast_config *cfg, struct ast_category **cat, 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; |