[Asterisk-cvs] asterisk/pbx pbx_spool.c,1.5.2.4,1.5.2.5

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


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

Modified Files:
      Tag: v1-0_stable
	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.5.2.4
retrieving revision 1.5.2.5
diff -u -d -r1.5.2.4 -r1.5.2.5
--- pbx_spool.c	5 Apr 2004 02:48:23 -0000	1.5.2.4
+++ pbx_spool.c	5 Apr 2004 18:03:49 -0000	1.5.2.5
@@ -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