summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2009-09-20 09:09:36 +0000
committeralecpl <alec@alec.pl>2009-09-20 09:09:36 +0000
commit587444f657dd6f1d64b2ea46374c253232bae879 (patch)
tree2d9d0bb8e835729b0bc8497ce4f908b079eb2499
parentf8dae9f00f78478720e7365b9dfd88a600776032 (diff)
- Fix "Empty startup greeting" bug (#1486085)
-rw-r--r--CHANGELOG1
-rw-r--r--program/lib/imap.inc8
2 files changed, 5 insertions, 4 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 36b6335d6..7809a01ab 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -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)
diff --git a/program/lib/imap.inc b/program/lib/imap.inc
index a57250141..04af1d029 100644
--- a/program/lib/imap.inc
+++ b/program/lib/imap.inc
@@ -612,7 +612,7 @@ function iil_Connect($host, $user, $password, $options=null) {
$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 @@ function iil_Connect($host, $user, $password, $options=null) {
}
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 @@ function iil_Connect($host, $user, $password, $options=null) {
$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 @@ function iil_Connect($host, $user, $password, $options=null) {
}
}
- 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";