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
1.6.0
Tilghman Lesher 18 years ago
parent ce90623010
commit b6c7daa804

@ -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);

Loading…
Cancel
Save