From fefed62caa38a83b10f20db07467f13dcc330c70 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Fri, 02 Oct 2009 13:12:51 -0400
Subject: [PATCH] - simple fix in iil_C_FetchHeaders to handle "* BYE" response

---
 program/lib/imap.inc |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/program/lib/imap.inc b/program/lib/imap.inc
index 90938f4..437ea59 100644
--- a/program/lib/imap.inc
+++ b/program/lib/imap.inc
@@ -342,7 +342,6 @@
 	}
 	if ($error && preg_match('/^\* (BYE|BAD) /i', $string)) {
 		return true;
-
 	}
 	return false;
 }
@@ -1545,7 +1544,7 @@
 					$lines[++$ln] = trim($line);
 				}
 			// patch from "Maksim Rubis" <siburny@hotmail.com>
-			} while (trim($line[0]) != ')' && strncmp($line, $key, strlen($key)));
+			} while ($line[0] != ')' && !iil_StartsWith($line, $key, true));
 
 			if (strncmp($line, $key, strlen($key))) { 
 				// process header, fill iilBasicHeader obj.

--
Gitblit v1.9.1