[PATCH 3/7] On parsing IMAP FETCH, if response size specifier is NIL, don't fail
- From: Jose Dapena Paz <jdapena igalia com>
- Subject: [PATCH 3/7] On parsing IMAP FETCH, if response size specifier is NIL, don't fail
- Date: Fri, 11 Dec 2009 13:55:44 +0100
---
 ChangeLog                                          |    1 +
 .../camel/providers/imap/camel-imap-folder.c       |   16 ++++++++++++++--
 2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index d8458c5..2c8e84e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@
 	* Add the bodystruct of the child to the embedded message created
 	in tny_camel_bs_mime_part_get_parts, as this is the expected
 	structure in tinymail.
+	* Handle better in IMAP "NIL" parameter in fetch response.
 
 2009-12-11  Sergio Villar Senin  <svillar igalia com>
 
diff --git a/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-folder.c b/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-folder.c
index b20dddc..d60ce4d 100644
--- a/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-folder.c
+++ b/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-folder.c
@@ -5376,7 +5376,13 @@ fetch_berrorhander:
 							}
 							linenum++;
 						} else {
-							imap_debug ("Unsolicited in FETCH: %s\n", line);
+							pos = g_strstr_len (line, -1, "NIL");
+							if (pos) {
+								exread = 0;
+								linenum++;
+							} else {
+								imap_debug ("Unsolicited in FETCH: %s\n", line);
+							}
 						}
 						continue;
 					}
@@ -6030,7 +6036,13 @@ Received: from nic.funet.fi
 						}
 						linenum++;
 					} else {
-						imap_debug ("Unsolicited in FETCH: %s\n", line);
+						pos = g_strstr_len (line, -1, "NIL");
+						if (pos) {
+							exread = 0;
+							linenum++;
+						} else {
+							imap_debug ("Unsolicited in FETCH: %s\n", line);
+						}
 					}
 					memset (line, 0, MAX_LINE_LEN);
 					continue;
-- 
1.6.3.3
--=-7xSGRSdHbBXdNvov60N6
Content-Disposition: attachment; filename*0=0004-In-bs-parser-put-proper-part-spec-id-to-direct-child.pat; filename*1=ch
Content-Type: text/x-patch; name="0004-In-bs-parser-put-proper-part-spec-id-to-direct-child.patch"; charset="UTF-8"
Content-Transfer-Encoding: 7bit
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]