aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog7
-rw-r--r--camel/camel-folder-summary.h4
-rw-r--r--camel/providers/imap4/camel-imap4-summary.c14
3 files changed, 13 insertions, 12 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 0bbeaa6ce1..6b85e40f91 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,10 @@
+2004-11-10 Jeffrey Stedfast <fejj@novell.com>
+
+ * providers/imap4/camel-imap4-summary.c (imap4_summary_fetch_all):
+ Use the expanded ALL macro as on closer inspection of the RFC,
+ we're not allowed to use macros in conjunction with other FETCH
+ items (such as UID in our case).
+
2004-11-09 Not Zed <NotZed@Ximian.com>
* providers/imap/camel-imap-folder.c (imap_get_message): before
diff --git a/camel/camel-folder-summary.h b/camel/camel-folder-summary.h
index bc9b9b6017..de56a6e8e0 100644
--- a/camel/camel-folder-summary.h
+++ b/camel/camel-folder-summary.h
@@ -63,13 +63,13 @@ enum _CamelMessageFlags {
CAMEL_MESSAGE_DRAFT = 1<<2,
CAMEL_MESSAGE_FLAGGED = 1<<3,
CAMEL_MESSAGE_SEEN = 1<<4,
-
+
/* these aren't really system flag bits, but are convenience flags */
CAMEL_MESSAGE_ATTACHMENTS = 1<<5,
CAMEL_MESSAGE_ANSWERED_ALL = 1<<6,
CAMEL_MESSAGE_JUNK = 1<<7,
CAMEL_MESSAGE_SECURE = 1<<8,
-
+
/* following flags are for the folder, and are not really permanent flags */
CAMEL_MESSAGE_FOLDER_FLAGGED = 1<<16, /* for use by the folder implementation */
diff --git a/camel/providers/imap4/camel-imap4-summary.c b/camel/providers/imap4/camel-imap4-summary.c
index d1d581d690..77023ad7f2 100644
--- a/camel/providers/imap4/camel-imap4-summary.c
+++ b/camel/providers/imap4/camel-imap4-summary.c
@@ -965,6 +965,8 @@ untagged_fetch_all (CamelIMAP4Engine *engine, CamelIMAP4Command *ic, guint32 ind
return -1;
}
+#define IMAP4_ALL "FLAGS INTERNALDATE RFC822.SIZE ENVELOPE"
+
static CamelIMAP4Command *
imap4_summary_fetch_all (CamelFolderSummary *summary, guint32 first, guint32 last)
{
@@ -988,18 +990,10 @@ imap4_summary_fetch_all (CamelFolderSummary *summary, guint32 first, guint32 las
fetch->total = total;
fetch->count = 0;
- /* From rfc2060, Section 6.4.5:
- *
- * The currently defined data items that can be fetched are:
- *
- * ALL Macro equivalent to: (FLAGS INTERNALDATE
- * RFC822.SIZE ENVELOPE)
- **/
-
if (last != 0)
- ic = camel_imap4_engine_queue (engine, folder, "FETCH %u:%u (UID ALL)\r\n", first, last);
+ ic = camel_imap4_engine_queue (engine, folder, "FETCH %u:%u (UID %s)\r\n", first, last, IMAP4_ALL);
else
- ic = camel_imap4_engine_queue (engine, folder, "FETCH %u:* (UID ALL)\r\n", first);
+ ic = camel_imap4_engine_queue (engine, folder, "FETCH %u:* (UID %s)\r\n", first, IMAP4_ALL);
camel_imap4_command_register_untagged (ic, "FETCH", untagged_fetch_all);
ic->user_data = fetch;