[Asterisk-cvs] asterisk/pbx pbx_spool.c,1.10,1.11

citats at lists.digium.com citats at lists.digium.com
Mon Apr 5 14:03:33 CDT 2004


Update of /usr/cvsroot/asterisk/pbx
In directory mongoose.digium.com:/home/citats/cvs/asterisk/pbx

Modified Files:
	pbx_spool.c 
Log Message:
Make outgoing call spool only consider # a comment if at the beginning of a line or following whitespace (bug 1346)


Index: pbx_spool.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx/pbx_spool.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- pbx_spool.c	5 Apr 2004 02:47:48 -0000	1.10
+++ pbx_spool.c	5 Apr 2004 18:03:40 -0000	1.11
@@ -97,9 +97,13 @@
 		lineno++;
 		if (!feof(f)) {
 			/* Trim comments */
-			c = strchr(buf, '#');
-			if (c)
-				 *c = '\0';
+			c = buf;
+			while ((c = strchr(c, '#'))) {
+				if ((c == buf) || (*(c-1) == ' ') || (*(c-1) == '\t'))
+					*c = '\0';
+				else
+					c++;
+			}
 			c = strchr(buf, ';');
 			if (c)
 				 *c = '\0';




More information about the svn-commits mailing list