aboutsummaryrefslogtreecommitdiffstats
path: root/main/http.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-08-16 21:09:46 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-08-16 21:09:46 +0000
commitdbec3d56c146801fad339a1d46a388865b18ffb4 (patch)
tree8fda811f62cb6ffb99847befb7b74b1519ea95ba /main/http.c
parent0fb9c73a989207650aa3ba603824e4593809611b (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 'main/http.c')
-rw-r--r--main/http.c5
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) {