[Svn] r2972 - in trunk/roundcubemail: . program/lib

trac at roundcube.net trac at roundcube.net
Sun Sep 20 11:09:36 CEST 2009


Author: alec
Date: 2009-09-20 04:09:36 -0500 (Sun, 20 Sep 2009)
New Revision: 2972

Modified:
   trunk/roundcubemail/CHANGELOG
   trunk/roundcubemail/program/lib/imap.inc
Log:
- Fix "Empty startup greeting" bug (#1486085)


Modified: trunk/roundcubemail/CHANGELOG
===================================================================
--- trunk/roundcubemail/CHANGELOG	2009-09-20 06:53:11 UTC (rev 2971)
+++ trunk/roundcubemail/CHANGELOG	2009-09-20 09:09:36 UTC (rev 2972)
@@ -1,6 +1,7 @@
 CHANGELOG RoundCube Webmail
 ===========================
 
+- Fix "Empty startup greeting" bug (#1486085)
 - Fix setting user name in 'new_user_identity' plugin (#1486137)
 - Fix incorrect count of new messages in folder list when using multiple IMAP clients (#1485995)
 - Fix all folders checking for new messages with disabled caching (#1486128)

Modified: trunk/roundcubemail/program/lib/imap.inc
===================================================================
--- trunk/roundcubemail/program/lib/imap.inc	2009-09-20 06:53:11 UTC (rev 2971)
+++ trunk/roundcubemail/program/lib/imap.inc	2009-09-20 09:09:36 UTC (rev 2972)
@@ -612,7 +612,7 @@
 		$host = $ICL_SSL . '://' . $host;
 	}
 
-	$conn->fp = fsockopen($host, $ICL_PORT, $errno, $errstr, 10);
+	$conn->fp = @fsockopen($host, $ICL_PORT, $errno, $errstr, 10);
 	if (!$conn->fp) {
     		$iil_error = "Could not connect to $host at port $ICL_PORT: $errstr";
     		$iil_errornum = -2;
@@ -620,7 +620,7 @@
 	}
 
 	stream_set_timeout($conn->fp, 10);
-	$line = stream_get_line($conn->fp, 8192, "\n");
+	$line = trim(fgets($conn->fp, 8192));
 
 	if ($my_prefs['debug_mode'] && $line)
 		write_log('imap', 'S: '. $line);
@@ -640,7 +640,7 @@
 		$conn->capability = explode(' ', strtoupper($matches[1]));
 	}
 
-	$conn->message .= $line;
+	$conn->message .= $line . "\n";
 
 	// TLS connection
 	if ($ICL_SSL == 'tls' && iil_C_GetCapability($conn, 'STARTTLS')) {
@@ -704,7 +704,7 @@
 		}
 	}
 		
-	if ((!$result)||(strcasecmp($auth, "plain") == 0)) {
+	if (!$result || strcasecmp($auth, "plain") == 0) {
 		//do plain text auth
 		$result = iil_C_Login($conn, $user, $password);
 		$conn->message .= "Tried PLAIN: $result \n";

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list