From: Richard Mudgett Date: Mon, 12 Oct 2015 16:21:55 +0000 (-0500) Subject: config.c: Fix #include after [section](+). X-Git-Tag: 11.21.0-rc1~29^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fchanges%2F19%2F1419%2F1;p=thirdparty%2Fasterisk.git 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 --- diff --git a/main/config.c b/main/config.c index c49f82c977..acbf08b343 100644 --- a/main/config.c +++ b/main/config.c @@ -1443,6 +1443,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;