mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-19 16:20:37 +00:00
Don't reload a configuration file if nothing has changed.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2290,13 +2290,14 @@ static void ast_readconfig(void)
|
||||
struct ast_variable *v;
|
||||
char *config = AST_CONFIG_FILE;
|
||||
char hostname[MAXHOSTNAMELEN] = "";
|
||||
struct ast_flags config_flags = { 0 };
|
||||
|
||||
if (ast_opt_override_config) {
|
||||
cfg = ast_config_load(ast_config_AST_CONFIG_FILE);
|
||||
cfg = ast_config_load(ast_config_AST_CONFIG_FILE, config_flags);
|
||||
if (!cfg)
|
||||
ast_log(LOG_WARNING, "Unable to open specified master config file '%s', using built-in defaults\n", ast_config_AST_CONFIG_FILE);
|
||||
} else
|
||||
cfg = ast_config_load(config);
|
||||
cfg = ast_config_load(config, config_flags);
|
||||
|
||||
/* init with buildtime config */
|
||||
ast_copy_string(ast_config_AST_CONFIG_DIR, AST_CONFIG_DIR, sizeof(ast_config_AST_CONFIG_DIR));
|
||||
|
||||
Reference in New Issue
Block a user