[evolution-data-server/gnome-2-30] Bug 621262 - Fix fetch of large mails from broken servers like Exchange
- From: David Woodhouse <dwmw2 src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/gnome-2-30] Bug 621262 - Fix fetch of large mails from broken servers like Exchange
- Date: Fri, 11 Jun 2010 14:23:19 +0000 (UTC)
commit 86a2ebd261412124efb81f260d5cc1fe54c2db03
Author: David Woodhouse <David Woodhouse intel com>
Date: Fri Jun 11 01:42:59 2010 +0100
Bug 621262 - Fix fetch of large mails from broken servers like Exchange
camel/providers/imapx/camel-imapx-server.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index 4dc284b..a602e22 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -2582,8 +2582,13 @@ imapx_command_fetch_message_done(CamelIMAPXServer *is, CamelIMAPXCommand *ic)
failed = TRUE;
job->u.get_message.body_len = -1;
} else if (job->u.get_message.use_multi_fetch) {
-
- if (!failed && job->u.get_message.fetch_offset <= job->u.get_message.size) {
+ gsize really_fetched = CAMEL_SEEKABLE_STREAM(job->u.get_message.stream)->position;
+ /* Don't automatically stop when we reach the reported message
+ size -- some crappy servers (like Microsoft Exchange) have
+ a tendency to lie about it. Keep going (one request at a
+ time) until the data actually stop coming. */
+ if (job->u.get_message.fetch_offset < job->u.get_message.size ||
+ job->u.get_message.fetch_offset == really_fetched) {
camel_imapx_command_free (ic);
if (job->op)
camel_operation_progress (job->op, (job->u.get_message.fetch_offset *100)/job->u.get_message.size);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]