aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-02 13:17:48 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-02 13:17:48 +0000
commit91e1d7a423cae03ac35ae737392eae80ee20a217 (patch)
treed5bb505176566d9288968fae92d8cf7d2aa104cc /main
parent991e435f45f3e476f2c7dfbe2a936bcd872fe403 (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: http://svn.digium.com/svn/asterisk/trunk@88212 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r--main/config.c6
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);