[Asterisk-cvs] asterisk/pbx pbx_spool.c,1.29,1.30

russell russell
Tue Oct 11 16:57:47 CDT 2005


Update of /usr/cvsroot/asterisk/pbx
In directory mongoose.digium.com:/tmp/cvs-serv992/pbx

Modified Files:
	pbx_spool.c 
Log Message:
allow semicolons to be escaped in call files (issue #5407)


Index: pbx_spool.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx/pbx_spool.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- pbx_spool.c	11 Oct 2005 20:44:23 -0000	1.29
+++ pbx_spool.c	11 Oct 2005 20:52:37 -0000	1.30
@@ -129,9 +129,17 @@
 			else
 				c++;
 		}
-		c = strchr(buf, ';');
-		if (c)
-			 *c = '\0';
+
+		c = buf;
+		while ((c = strchr(c, ';'))) {
+			if ((c > buf) && (c[-1] == '\\')) {
+				memmove(c - 1, c, strlen(c) + 1);
+				c++;
+			} else {
+				*c = '\0';
+				break;
+			}
+		}
 
 		/* Trim trailing white space */
 		while(!ast_strlen_zero(buf) && buf[strlen(buf) - 1] < 33)




More information about the svn-commits mailing list