[prev in list] [next in list] [prev in thread] [next in thread] 

List:       squirrelmail-cvs
Subject:    [SM-CVS] SF.net SVN: squirrelmail:[14112]
From:       pdontthink () users ! sourceforge ! net
Date:       2011-05-08 7:57:09
Message-ID: E1QIyrV-0004sQ-Vm () sfp-svn-1 ! v30 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Revision: 14112
          http://squirrelmail.svn.sourceforge.net/squirrelmail/?rev=14112&view=rev
Author:   pdontthink
Date:     2011-05-08 07:57:09 +0000 (Sun, 08 May 2011)

Log Message:
-----------
Allow configuration setting values to contain spaces

Modified Paths:
--------------
    trunk/imap_proxy/src/config.c

Modified: trunk/imap_proxy/src/config.c
===================================================================
--- trunk/imap_proxy/src/config.c	2011-05-03 07:46:46 UTC (rev 14111)
+++ trunk/imap_proxy/src/config.c	2011-05-08 07:57:09 UTC (rev 14112)
@@ -393,6 +393,9 @@
     ADD_TO_TABLE( "cache_expiration_time", SetNumericValue, 
 		  &PC_Struct.cache_expiration_time, index );
 
+    ADD_TO_TABLE( "preauth_command", SetStringValue,
+		  &PC_Struct.preauth_command, index );
+
     ADD_TO_TABLE( "auth_sasl_plain_username", SetStringValue,
 		  &PC_Struct.auth_sasl_plain_username, index );
     
@@ -505,6 +508,24 @@
 	}
 	
 	Value = CP;
+
+	// we don't just want the next token, we want the rest of the line
+	// (put back the space that strtok() changed into a null character)
+	//
+	Value[ strlen( Value ) ] = ' ';
+
+	// however, we then have to be careful to remove trailing whitespace
+	//
+	i = strlen( Value ) - 1;
+	while ( ( Value[ i ] == ' ' )
+	     || ( Value[ i ] == '\t' )
+	     || ( Value[ i ] == '\r' )
+	     || ( Value[ i ] == '\n' ) )
+	{
+	    i--;
+	}
+	if ( i < ( strlen( Value ) - 1 ) )
+	    Value[ i + 1 ] = '\0';
 	
 	for (i = 0; ConfigTable[i].Keyword[0] != '\0'; i++ )
 	{


This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.

------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
-----
squirrelmail-cvs mailing list
List address: squirrelmail-cvs@lists.sourceforge.net
List info (subscribe/unsubscribe/change options): \
                https://lists.sourceforge.net/lists/listinfo/squirrelmail-cvs
Repository: http://squirrelmail.org/svn


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic