From: Russell Bryant Date: Fri, 16 Feb 2007 18:03:41 +0000 (+0000) Subject: Fix setting "autofallthrough" to yes by default. It was set to enabled in X-Git-Tag: 1.4.1~88 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0c00d00d1e034103e0346df4736dabaa5f4b7c09;p=thirdparty%2Fasterisk.git Fix setting "autofallthrough" to yes by default. It was set to enabled in pbx.c. However, if the option was not present in extensions.conf, then pbx_config.c would set it back to disabled. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@54898 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/pbx/pbx_config.c b/pbx/pbx_config.c index 640c60aa35..54555d6508 100644 --- a/pbx/pbx_config.c +++ b/pbx/pbx_config.c @@ -48,7 +48,7 @@ static char userscontext[AST_MAX_EXTENSION] = "default"; static int static_config = 0; static int write_protect_config = 1; -static int autofallthrough_config = 0; +static int autofallthrough_config = 1; static int clearglobalvars_config = 0; AST_MUTEX_DEFINE_STATIC(save_dialplan_lock); @@ -2172,6 +2172,7 @@ static int pbx_load_config(const char *config_file) struct ast_context *con; struct ast_variable *v; const char *cxt; + const char *aft; cfg = ast_config_load(config_file); if (!cfg) @@ -2180,7 +2181,8 @@ static int pbx_load_config(const char *config_file) /* Use existing config to populate the PBX table */ static_config = ast_true(ast_variable_retrieve(cfg, "general", "static")); write_protect_config = ast_true(ast_variable_retrieve(cfg, "general", "writeprotect")); - autofallthrough_config = ast_true(ast_variable_retrieve(cfg, "general", "autofallthrough")); + if ((aft = ast_variable_retrieve(cfg, "general", "autofallthrough"))) + autofallthrough_config = ast_true(aft); clearglobalvars_config = ast_true(ast_variable_retrieve(cfg, "general", "clearglobalvars")); ast_set2_flag(&ast_options, ast_true(ast_variable_retrieve(cfg, "general", "priorityjumping")), AST_OPT_FLAG_PRIORITY_JUMPING);