diff options
author | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-08-16 21:09:46 +0000 |
---|---|---|
committer | tilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-08-16 21:09:46 +0000 |
commit | dbec3d56c146801fad339a1d46a388865b18ffb4 (patch) | |
tree | 8fda811f62cb6ffb99847befb7b74b1519ea95ba /funcs | |
parent | 0fb9c73a989207650aa3ba603824e4593809611b (diff) |
Don't reload a configuration file if nothing has changed.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@79747 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'funcs')
-rw-r--r-- | funcs/func_odbc.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/funcs/func_odbc.c b/funcs/func_odbc.c index 856c5c288..ee80fcc98 100644 --- a/funcs/func_odbc.c +++ b/funcs/func_odbc.c @@ -746,12 +746,13 @@ static int load_module(void) int res = 0; struct ast_config *cfg; char *catg; + struct ast_flags config_flags = { 0 }; res |= ast_custom_function_register(&fetch_function); res |= ast_register_application(app_odbcfinish, exec_odbcfinish, syn_odbcfinish, desc_odbcfinish); AST_LIST_LOCK(&queries); - cfg = ast_config_load(config); + cfg = ast_config_load(config, config_flags); if (!cfg) { ast_log(LOG_NOTICE, "Unable to load config for func_odbc: %s\n", config); AST_LIST_UNLOCK(&queries); @@ -815,6 +816,11 @@ static int reload(void) struct ast_config *cfg; struct acf_odbc_query *oldquery; char *catg; + struct ast_flags config_flags = { CONFIG_FLAG_FILEUNCHANGED }; + + cfg = ast_config_load(config, config_flags); + if (cfg == CONFIG_STATUS_FILEUNCHANGED) + return 0; AST_LIST_LOCK(&queries); @@ -824,7 +830,6 @@ static int reload(void) free_acf_query(oldquery); } - cfg = ast_config_load(config); if (!cfg) { ast_log(LOG_WARNING, "Unable to load config for func_odbc: %s\n", config); goto reload_out; |