From a14a4d5194c7be3acb899b974ee87735cc1d70a7 Mon Sep 17 00:00:00 2001
From: Kinsey Moore <kmoore@digium.com>
Date: Wed, 5 Mar 2014 20:37:51 +0000
Subject: [PATCH] config: Fix inverted test

The test of the result of the stat() call was inverted such that its
output was only used if the call failed. This inverts the test so that
the output of stat() is used correctly. This was causing full reloads
on unchanged files.

(closes issue ASTERISK-23383)
Reported by: David Woolley
........

Merged revisions 409916 from http://svn.asterisk.org/svn/asterisk/branches/1.8


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@409917 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 main/config.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/main/config.c b/main/config.c
index e57ad71bd7..29c4c07a7f 100644
--- a/main/config.c
+++ b/main/config.c
@@ -1266,7 +1266,7 @@ static void config_cache_attribute(const char *configfile, enum config_cache_att
 		AST_LIST_INSERT_SORTALPHA(&cfmtime_head, cfmtime, list, filename);
 	}
 
-	if (!stat(configfile, &statbuf)) {
+	if (stat(configfile, &statbuf)) {
 		cfmstat_clear(cfmtime);
 	} else {
 		cfmstat_save(cfmtime, &statbuf);
-- 
GitLab