diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2007-08-16 21:09:46 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2007-08-16 21:09:46 +0000 |
commit | 56b9568164b694a42e88f1f8a31012078b833203 (patch) | |
tree | 8fda811f62cb6ffb99847befb7b74b1519ea95ba /main/http.c | |
parent | c0060cd99a0a318b504da4c13eee85f3b9043fdc (diff) |
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
Diffstat (limited to 'main/http.c')
-rw-r--r-- | main/http.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/main/http.c b/main/http.c index b61858cde..b4aac2636 100644 --- a/main/http.c +++ b/main/http.c @@ -1134,6 +1134,10 @@ static int __ast_http_load(int reload) char newprefix[MAX_PREFIX]; int have_sslbindaddr = 0; struct http_uri_redirect *redirect; + struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 }; + + if ((cfg = ast_config_load("http.conf", config_flags)) == CONFIG_STATUS_FILEUNCHANGED) + return 0; /* default values */ memset(&http_desc.sin, 0, sizeof(http_desc.sin)); @@ -1159,7 +1163,6 @@ static int __ast_http_load(int reload) destroy_post_mappings(); - cfg = ast_config_load("http.conf"); if (cfg) { v = ast_variable_browse(cfg, "general"); for (; v; v = v->next) { |