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 /pbx/pbx_config.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 'pbx/pbx_config.c')
-rw-r--r-- | pbx/pbx_config.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/pbx/pbx_config.c b/pbx/pbx_config.c index a6b4e0171..77862d0c1 100644 --- a/pbx/pbx_config.c +++ b/pbx/pbx_config.c @@ -722,6 +722,7 @@ static int handle_save_dialplan(int fd, int argc, char *argv[]) struct ast_variable *v; int incomplete = 0; /* incomplete config write? */ FILE *output; + struct ast_flags config_flags = { 0 }; const char *base, *slash, *file; @@ -761,7 +762,7 @@ static int handle_save_dialplan(int fd, int argc, char *argv[]) } snprintf(filename, sizeof(filename), "%s%s%s", base, slash, config); - cfg = ast_config_load("extensions.conf"); + cfg = ast_config_load("extensions.conf", config_flags); /* try to lock contexts list */ if (ast_rdlock_contexts()) { @@ -1329,8 +1330,9 @@ static int pbx_load_config(const char *config_file) struct ast_variable *v; const char *cxt; const char *aft; + struct ast_flags config_flags = { 0 }; - cfg = ast_config_load(config_file); + cfg = ast_config_load(config_file, config_flags); if (!cfg) return 0; @@ -1501,8 +1503,9 @@ static void pbx_load_users(void) int hasvoicemail; int start, finish, x; struct ast_context *con; + struct ast_flags config_flags = { 0 }; - cfg = ast_config_load("users.conf"); + cfg = ast_config_load("users.conf", config_flags); if (!cfg) return; con = ast_context_find_or_create(&local_contexts, userscontext, registrar); |