[svn-commits] tilghman: branch 1.6.2 r272924 - in /branches/1.6.2: ./ main/config.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Jun 28 16:46:50 CDT 2010


Author: tilghman
Date: Mon Jun 28 16:46:46 2010
New Revision: 272924

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=272924
Log:
Merged revisions 272923 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
  r272923 | tilghman | 2010-06-28 16:42:52 -0500 (Mon, 28 Jun 2010) | 19 lines
  
  Merged revisions 272921-272922 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r272921 | tilghman | 2010-06-28 16:29:27 -0500 (Mon, 28 Jun 2010) | 8 lines
    
    Change the way that we read include files, to accommodate for changes in GCC 4.4.
    
    (closes issue #17472)
     Reported by: seandarcy
     Patches: 
           config2.patch uploaded by nivan (license 1066)
     Tested by: nivan
  ........
    r272922 | tilghman | 2010-06-28 16:38:49 -0500 (Mon, 28 Jun 2010) | 2 lines
    
    Also trim trailing blanks on #includes
  ........
................

Modified:
    branches/1.6.2/   (props changed)
    branches/1.6.2/main/config.c

Propchange: branches/1.6.2/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.2/main/config.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.2/main/config.c?view=diff&rev=272924&r1=272923&r2=272924
==============================================================================
--- branches/1.6.2/main/config.c (original)
+++ branches/1.6.2/main/config.c Mon Jun 28 16:46:46 2010
@@ -1023,12 +1023,13 @@
 		if (*c) {
 			*c = '\0';
 			/* Find real argument */
-			c = ast_skip_blanks(c + 1);
+			c = ast_strip(c + 1);
 			if (!(*c)) {
 				c = NULL;
 			}
-		} else 
+		} else {
 			c = NULL;
+		}
 		if (!strcasecmp(cur, "include")) {
 			do_include = 1;
 		} else if (!strcasecmp(cur, "exec")) {
@@ -1052,20 +1053,14 @@
 
 		cur = c;
 		/* Strip off leading and trailing "'s and <>'s */
-		if (*c == '"') {
-			/* Dequote */
-			while (*c) {
-				if (*c == '"') {
-					strcpy(c, c + 1); /* SAFE */
-					c--;
-				} else if (*c == '\\') {
-					strcpy(c, c + 1); /* SAFE */
-				}
-				c++;
-			}
-		} else if (*c == '<') {
-			/* C-style include */
-			if (*(c + strlen(c) - 1) == '>') {
+		/* Dequote */
+		if ((*c == '"') || (*c == '<')) {
+			char quote_char = *c;
+			if (quote_char == '<') {
+				quote_char = '>';
+			}
+
+			if (*(c + strlen(c) - 1) == quote_char) {
 				cur++;
 				*(c + strlen(c) - 1) = '\0';
 			}




More information about the svn-commits mailing list