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 /apps/app_rpt.c | |
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 'apps/app_rpt.c')
-rw-r--r-- | apps/app_rpt.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/app_rpt.c b/apps/app_rpt.c index ad38de179..77e4ee4ef 100644 --- a/apps/app_rpt.c +++ b/apps/app_rpt.c @@ -918,6 +918,7 @@ static void load_rpt_vars(int n, int init) int j; struct ast_variable *vp, *var; struct ast_config *cfg; + struct ast_flags config_flags = { CONFIG_FLAG_NOCACHE }; #ifdef __RPT_NOTCH AST_DECLARE_APP_ARGS(strs, AST_APP_ARG(str)[100]; @@ -929,7 +930,7 @@ static void load_rpt_vars(int n, int init) ast_mutex_lock(&rpt_vars[n].lock); if (rpt_vars[n].cfg) ast_config_destroy(rpt_vars[n].cfg); - cfg = ast_config_load("rpt.conf"); + cfg = ast_config_load("rpt.conf", config_flags); if (!cfg) { ast_mutex_unlock(&rpt_vars[n].lock); ast_log(LOG_NOTICE, "Unable to open radio repeater configuration rpt.conf. Radio Repeater disabled.\n"); @@ -7437,7 +7438,8 @@ static int unload_module(void) static int load_module(void) { - struct ast_config *cfg = ast_config_load("rpt.conf"); + struct ast_flags config_flags = { CONFIG_FLAG_NOCACHE }; + struct ast_config *cfg = ast_config_load("rpt.conf", config_flags); if (!cfg) { ast_log(LOG_WARNING, "No such configuration file rpt.conf\n"); return AST_MODULE_LOAD_DECLINE; |