summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2012-04-12 16:29:52 +0000
committerRichard Mudgett <rmudgett@digium.com>2012-04-12 16:29:52 +0000
commita35c7ba8e7e5e05efb2ca3f57d31b4501bfdb75b (patch)
treea814ff52f8918c92f4e1d4b384c0b0d79f33dec3 /main
parentf9155c9c3d50b47b6c6b7619f1788d2e790803ca (diff)
Add option to invoke the extensions.conf stdexten using the legacy macro method.
ASTERISK-18809 eliminated the legacy macro invocation of the stdexten in favor of the Gosub method without a means of backwards compatibility. (issue ASTERISK-18809) (closes issue ASTERISK-19457) Reported by: Matt Jordan Tested by: rmudgett Review: https://reviewboard.asterisk.org/r/1855/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@361998 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main')
-rw-r--r--main/asterisk.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/main/asterisk.c b/main/asterisk.c
index 19982b6e2..5f6449c92 100644
--- a/main/asterisk.c
+++ b/main/asterisk.c
@@ -3230,6 +3230,18 @@ static void ast_readconfig(void)
ast_set2_flag(&ast_options, ast_true(v->value), AST_OPT_FLAG_HIDE_CONSOLE_CONNECT);
} else if (!strcasecmp(v->name, "lockconfdir")) {
ast_set2_flag(&ast_options, ast_true(v->value), AST_OPT_FLAG_LOCK_CONFIG_DIR);
+ } else if (!strcasecmp(v->name, "stdexten")) {
+ /* Choose how to invoke the extensions.conf stdexten */
+ if (!strcasecmp(v->value, "gosub")) {
+ ast_clear_flag(&ast_options, AST_OPT_FLAG_STDEXTEN_MACRO);
+ } else if (!strcasecmp(v->value, "macro")) {
+ ast_set_flag(&ast_options, AST_OPT_FLAG_STDEXTEN_MACRO);
+ } else {
+ ast_log(LOG_WARNING,
+ "'%s' is not a valid setting for the stdexten option, defaulting to 'gosub'\n",
+ v->value);
+ ast_clear_flag(&ast_options, AST_OPT_FLAG_STDEXTEN_MACRO);
+ }
}
}
for (v = ast_variable_browse(cfg, "compat"); v; v = v->next) {