[asterisk-commits] tilghman: trunk r88212 - /trunk/main/config.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Nov 2 08:17:49 CDT 2007


Author: tilghman
Date: Fri Nov  2 08:17:48 2007
New Revision: 88212

URL: http://svn.digium.com/view/asterisk?view=rev&rev=88212
Log:
Don't re-cache the filename, but check to see if it already exists
Reported by: jamesgolovich
Patch by: jamesgolovich
Closes issue #11144

Modified:
    trunk/main/config.c

Modified: trunk/main/config.c
URL: http://svn.digium.com/view/asterisk/trunk/main/config.c?view=diff&rev=88212&r1=88211&r2=88212
==============================================================================
--- trunk/main/config.c (original)
+++ trunk/main/config.c Fri Nov  2 08:17:48 2007
@@ -818,6 +818,12 @@
 
 	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);




More information about the asterisk-commits mailing list