diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-09-20 09:09:36 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-09-20 09:09:36 +0000 |
| commit | d271ef9862f5d62211c15572b288958a36946307 (patch) | |
| tree | 7d1f9c75ee5f19a0470a903f93f514f6df438eac /roundcubemail/program/lib | |
| parent | 2327572f7b0bd788ec2bcf689e3358be014d2727 (diff) | |
- Fix "Empty startup greeting" bug (#1486085)
git-svn-id: https://svn.roundcube.net/trunk@2972 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/lib')
| -rw-r--r-- | roundcubemail/program/lib/imap.inc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/roundcubemail/program/lib/imap.inc b/roundcubemail/program/lib/imap.inc index a57250141..04af1d029 100644 --- a/roundcubemail/program/lib/imap.inc +++ b/roundcubemail/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"; |
