aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-04-04 05:46:32 +0800
committerDan Winship <danw@src.gnome.org>2001-04-04 05:46:32 +0800
commit4392191f4f48cf83d7ae44a3bfd3a51db472783a (patch)
treecb91d7be3d2128c3c489fad35345a1d0cedb7671 /camel
parent27def927798e072826f1dbd70dcc52fdb2a878c2 (diff)
downloadgsoc2013-evolution-4392191f4f48cf83d7ae44a3bfd3a51db472783a.tar
gsoc2013-evolution-4392191f4f48cf83d7ae44a3bfd3a51db472783a.tar.gz
gsoc2013-evolution-4392191f4f48cf83d7ae44a3bfd3a51db472783a.tar.bz2
gsoc2013-evolution-4392191f4f48cf83d7ae44a3bfd3a51db472783a.tar.lz
gsoc2013-evolution-4392191f4f48cf83d7ae44a3bfd3a51db472783a.tar.xz
gsoc2013-evolution-4392191f4f48cf83d7ae44a3bfd3a51db472783a.tar.zst
gsoc2013-evolution-4392191f4f48cf83d7ae44a3bfd3a51db472783a.zip
(imap_get_message): If the server_level < IMAP4rev1, always fetch
messages all-at-once, since they don't support the [#.MIME] syntax. svn path=/trunk/; revision=9145
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog3
-rw-r--r--camel/providers/imap/camel-imap-folder.c9
2 files changed, 9 insertions, 3 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index bc15521a81..eab94447d8 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -3,6 +3,9 @@
* providers/imap/camel-imap-folder.c (imap_sync): If we don't
change any flags or expunge, send a NOOP to give the server a
chance to send EXISTS, etc, messages.
+ (imap_get_message): If the server_level < IMAP4rev1, always fetch
+ messages all-at-once, since they don't support the [#.MIME]
+ syntax.
2001-04-02 Dan Winship <danw@ximian.com>
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c
index 0a8f0edd66..b05dcfb5e4 100644
--- a/camel/providers/imap/camel-imap-folder.c
+++ b/camel/providers/imap/camel-imap-folder.c
@@ -947,6 +947,7 @@ static CamelMimeMessage *
imap_get_message (CamelFolder *folder, const char *uid, CamelException *ex)
{
CamelImapFolder *imap_folder = CAMEL_IMAP_FOLDER (folder);
+ CamelImapStore *store = CAMEL_IMAP_STORE (folder->parent_store);
CamelMessageInfo *mi;
CamelMimeMessage *msg;
CamelStream *stream;
@@ -954,8 +955,11 @@ imap_get_message (CamelFolder *folder, const char *uid, CamelException *ex)
mi = camel_folder_summary_uid (folder->summary, uid);
g_return_val_if_fail (mi != NULL, NULL);
- /* Fetch small messages directly. */
- if (mi->size < IMAP_SMALL_BODY_SIZE) {
+ /* If the message is small, or the server doesn't support
+ * IMAP4rev1, fetch it in one piece.
+ */
+ if (mi->size < IMAP_SMALL_BODY_SIZE ||
+ store->server_level < IMAP_LEVEL_IMAP4REV1) {
camel_folder_summary_info_free (folder->summary, mi);
stream = camel_imap_folder_fetch_data (imap_folder, uid, "", FALSE, ex);
if (!stream)
@@ -972,7 +976,6 @@ imap_get_message (CamelFolder *folder, const char *uid, CamelException *ex)
* an empty content struct.)
*/
if (!mi->content->type) {
- CamelImapStore *store = CAMEL_IMAP_STORE (folder->parent_store);
CamelImapResponse *response;
GData *fetch_data;
char *body, *found_uid;