[asterisk-commits] russell: branch 1.4 r54898 - /branches/1.4/pbx/pbx_config.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Feb 16 11:03:42 MST 2007


Author: russell
Date: Fri Feb 16 12:03:41 2007
New Revision: 54898

URL: http://svn.digium.com/view/asterisk?view=rev&rev=54898
Log:
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.

Modified:
    branches/1.4/pbx/pbx_config.c

Modified: branches/1.4/pbx/pbx_config.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/pbx/pbx_config.c?view=diff&rev=54898&r1=54897&r2=54898
==============================================================================
--- branches/1.4/pbx/pbx_config.c (original)
+++ branches/1.4/pbx/pbx_config.c Fri Feb 16 12:03:41 2007
@@ -48,7 +48,7 @@
 
 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 @@
 	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 @@
 	/* 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);
 



More information about the asterisk-commits mailing list