From 56b9568164b694a42e88f1f8a31012078b833203 Mon Sep 17 00:00:00 2001 From: Tilghman Lesher Date: Thu, 16 Aug 2007 21:09:46 +0000 Subject: 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 --- main/http.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'main/http.c') 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) { -- cgit v1.2.3