mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 12:36:58 +00:00
Merge "pbx_config: Only the first [globals] section is seen." into 16
This commit is contained in:
6
CHANGES
6
CHANGES
@@ -12,6 +12,12 @@
|
|||||||
--- Functionality changes from Asterisk 16.0.0 to Asterisk 16.1.0 ------------
|
--- Functionality changes from Asterisk 16.0.0 to Asterisk 16.1.0 ------------
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
pbx_config
|
||||||
|
------------------
|
||||||
|
* pbx_config will now find and process multiple 'globals' sections from
|
||||||
|
extensions.conf. Variables are processed in the order they are found
|
||||||
|
and duplicate variables overwrite the previous value.
|
||||||
|
|
||||||
res_pjsip
|
res_pjsip
|
||||||
------------------
|
------------------
|
||||||
* New options 'trust_connected_line' and 'send_connected_line' have been
|
* New options 'trust_connected_line' and 'send_connected_line' have been
|
||||||
|
@@ -1714,10 +1714,20 @@ static int pbx_load_config(const char *config_file)
|
|||||||
|
|
||||||
ast_copy_string(userscontext, ast_variable_retrieve(cfg, "general", "userscontext") ?: "default", sizeof(userscontext));
|
ast_copy_string(userscontext, ast_variable_retrieve(cfg, "general", "userscontext") ?: "default", sizeof(userscontext));
|
||||||
|
|
||||||
for (v = ast_variable_browse(cfg, "globals"); v; v = v->next) {
|
/* ast_variable_browse does not merge multiple [globals] sections */
|
||||||
|
for (cxt = ast_category_browse(cfg, NULL);
|
||||||
|
cxt;
|
||||||
|
cxt = ast_category_browse(cfg, cxt)) {
|
||||||
|
if (strcasecmp(cxt, "globals")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (v = ast_variable_browse(cfg, cxt); v; v = v->next) {
|
||||||
pbx_substitute_variables_helper(NULL, v->value, realvalue, sizeof(realvalue) - 1);
|
pbx_substitute_variables_helper(NULL, v->value, realvalue, sizeof(realvalue) - 1);
|
||||||
pbx_builtin_setvar_helper(NULL, v->name, realvalue);
|
pbx_builtin_setvar_helper(NULL, v->name, realvalue);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (cxt = ast_category_browse(cfg, NULL);
|
for (cxt = ast_category_browse(cfg, NULL);
|
||||||
cxt;
|
cxt;
|
||||||
cxt = ast_category_browse(cfg, cxt)) {
|
cxt = ast_category_browse(cfg, cxt)) {
|
||||||
|
Reference in New Issue
Block a user