[asterisk-commits] qwell: branch 1.4 r78180 - /branches/1.4/main/config.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Aug 6 11:30:52 CDT 2007


Author: qwell
Date: Mon Aug  6 11:30:51 2007
New Revision: 78180

URL: http://svn.digium.com/view/asterisk?view=rev&rev=78180
Log:
Fix an issue with using UpdateConfig (manager action) where escaped semicolons
 in a config would be converted to just semicolons (\; to ;)

Issue 9938

Modified:
    branches/1.4/main/config.c

Modified: branches/1.4/main/config.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/config.c?view=diff&rev=78180&r1=78179&r2=78180
==============================================================================
--- branches/1.4/main/config.c (original)
+++ branches/1.4/main/config.c Mon Aug  6 11:30:51 2007
@@ -862,9 +862,8 @@
 				
 				while ((comment_p = strchr(new_buf, COMMENT_META))) {
 					if ((comment_p > new_buf) && (*(comment_p-1) == '\\')) {
-						/* Yuck, gotta memmove */
-						memmove(comment_p - 1, comment_p, strlen(comment_p) + 1);
-						new_buf = comment_p;
+						/* Escaped semicolons aren't comments. */
+						new_buf = comment_p + 1;
 					} else if(comment_p[1] == COMMENT_TAG && comment_p[2] == COMMENT_TAG && (comment_p[3] != '-')) {
 						/* Meta-Comment start detected ";--" */
 						if (comment < MAX_NESTED_COMMENTS) {




More information about the asterisk-commits mailing list