]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
config: Fix inverted test
authorKinsey Moore <kmoore@digium.com>
Wed, 5 Mar 2014 20:31:09 +0000 (20:31 +0000)
committerKinsey Moore <kmoore@digium.com>
Wed, 5 Mar 2014 20:31:09 +0000 (20:31 +0000)
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

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@409916 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/config.c

index e7986a78d7e6f50022be13adfc42dd9945df47be..16603952215dce6dc253e4b1f469f7c50336883a 100644 (file)
@@ -1146,7 +1146,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);