Skip to content

Commit

Permalink
- Fix errors handling in IMAP command continuations (#1485762)
Browse files Browse the repository at this point in the history
  • Loading branch information
alecpl committed Mar 6, 2009
1 parent 961afa1 commit 25f779d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
@@ -1,6 +1,10 @@
CHANGELOG RoundCube Webmail
---------------------------

2009/03/06 (alec)
----------
- Fix errors handling in IMAP command continuations (#1485762)

2009/03/04 (alec)
----------
- Fix datetime columns defaults in mysql's DDL (#1485641)
Expand Down
9 changes: 7 additions & 2 deletions program/lib/imap.inc
Expand Up @@ -220,6 +220,9 @@ function iil_PutLineC($fp, $string, $endln=true) {
if(preg_match('/^\{[0-9]+\}\r\n$/', $parts[$i+1])) {
$res += iil_PutLine($fp, $parts[$i].$parts[$i+1], false);
$line = iil_ReadLine($fp, 1000);
// handle error in command
if ($line[0] != '+')
return false;
$i++;
}
else
Expand Down Expand Up @@ -292,7 +295,7 @@ function iil_ReadReply($fp) {
}

function iil_ParseResult($string) {
$a=explode(' ', $string);
$a = explode(' ', $string);
if (count($a) > 2) {
if (strcasecmp($a[1], 'OK') == 0) {
return 0;
Expand Down Expand Up @@ -2142,7 +2145,9 @@ function iil_C_Search(&$conn, $folder, $criteria) {
$c = 0;

$query = 'srch1 SEARCH ' . chop($criteria);
iil_PutLineC($fp, $query);
if (!iil_PutLineC($fp, $query)) {
return false;
}
do {
$line=trim(iil_ReadLine($fp, 10000));
if (eregi("^\* SEARCH", $line)) {
Expand Down

0 comments on commit 25f779d

Please sign in to comment.