[evolution-data-server/gnome-2-30] Don't refetch message headers we already have.



commit 91ad06035dc633f362ec87c0fd2d8e9621fa267d
Author: David Woodhouse <David Woodhouse intel com>
Date:   Fri Jul 2 09:57:31 2010 +0100

    Don't refetch message headers we already have.
    
    We were issuing a headers FETCH starting from the last known UID. But we
    already _had_ the headers for the last known UID. Start from $UID+1 instead.
    (cherry picked from commit 6df64040a866166d54cc35078f204ee60e474f36)

 camel/providers/imapx/camel-imapx-server.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index f2cbf61..36ec812 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -3636,9 +3636,13 @@ imapx_job_fetch_new_messages_start (CamelIMAPXServer *is, CamelIMAPXJob *job)
 	total = camel_folder_summary_count (folder->summary);
 	diff = ifolder->exists_on_server - total;
 
-	if (total > 0)
+	if (total > 0) {
+		unsigned long long uidl;
 		uid = camel_folder_summary_uid_from_index (folder->summary, total - 1);
-	else
+		uidl = strtoull(uid, NULL, 10);
+		g_free(uid);
+		uid = g_strdup_printf("%lld", uidl+1);
+	} else
 		uid = g_strdup ("1");
 
 	camel_operation_start (job->op, _("Fetching summary information for new messages in %s"), folder->name);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]