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_directory.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_directory.c')
-rw-r--r-- | apps/app_directory.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/app_directory.c b/apps/app_directory.c index 4564014ef..896f9cbe1 100644 --- a/apps/app_directory.c +++ b/apps/app_directory.c @@ -364,9 +364,10 @@ static struct ast_config *realtime_directory(char *context) const char *fullname; const char *hidefromdir; char tmp[100]; + struct ast_flags config_flags = { 0 }; /* Load flat file config. */ - cfg = ast_config_load(VOICEMAIL_CONFIG); + cfg = ast_config_load(VOICEMAIL_CONFIG, config_flags); if (!cfg) { /* Loading config failed. */ @@ -597,6 +598,7 @@ static int directory_exec(struct ast_channel *chan, void *data) int fromappvm = 0; const char *dirintro; char *parse; + struct ast_flags config_flags = { 0 }; AST_DECLARE_APP_ARGS(args, AST_APP_ARG(vmcontext); AST_APP_ARG(dialcontext); @@ -630,7 +632,7 @@ static int directory_exec(struct ast_channel *chan, void *data) return -1; } - ucfg = ast_config_load("users.conf"); + ucfg = ast_config_load("users.conf", config_flags); dirintro = ast_variable_retrieve(cfg, args.vmcontext, "directoryintro"); if (ast_strlen_zero(dirintro)) @@ -674,7 +676,8 @@ static int unload_module(void) static int load_module(void) { #ifdef ODBC_STORAGE - struct ast_config *cfg = ast_config_load(VOICEMAIL_CONFIG); + struct ast_flags config_flags = { 0 }; + struct ast_config *cfg = ast_config_load(VOICEMAIL_CONFIG, config_flags); const char *tmp; if (cfg) { |