diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2007-11-02 13:17:48 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2007-11-02 13:17:48 +0000 |
commit | b6c7daa80456f759d5f64be41492f565e7f05889 (patch) | |
tree | d5bb505176566d9288968fae92d8cf7d2aa104cc /main/config.c | |
parent | ce90623010ebd9b0fcf7f0a1fa2f6a2976d49cef (diff) |
Don't re-cache the filename, but check to see if it already exists
Reported by: jamesgolovich
Patch by: jamesgolovich
Closes issue #11144
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@88212 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/config.c')
-rw-r--r-- | main/config.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/main/config.c b/main/config.c index 88bfd8a5f..e2f0a8dc4 100644 --- a/main/config.c +++ b/main/config.c @@ -818,6 +818,12 @@ static void config_cache_attribute(const char *configfile, enum config_cache_att switch (attrtype) { case ATTRIBUTE_INCLUDE: + AST_LIST_TRAVERSE(&cfmtime->includes, cfinclude, list) { + if (!strcmp(cfinclude->include, filename)) { + AST_LIST_UNLOCK(&cfmtime_head); + return; + } + } cfinclude = ast_calloc(1, sizeof(*cfinclude) + strlen(filename) + 1); if (!cfinclude) { AST_LIST_UNLOCK(&cfmtime_head); |