diff options
Diffstat (limited to 'camel')
-rw-r--r-- | camel/ChangeLog | 10 | ||||
-rw-r--r-- | camel/providers/imap4/camel-imap4-summary.c | 10 |
2 files changed, 16 insertions, 4 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index ec442955d6..bad3959169 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -5,8 +5,8 @@ our GPtrArray, allowing us to limit resource consumption which could otherwise get quite large. Also added a ChangeInfo member that was needed for changes to untagged_fetch_all(). - (imap4_fetch_all_add): Use fetch->first as a base offset and change - int i to guint32 i. Also updated to sue the fetch->changes. + (imap4_fetch_all_add): Use fetch->first as a base offset and + change int i to guint32 i. Also updated to sue the fetch->changes. (imap4_fetch_all_update): Same. (untagged_fetch_all): Same - this is where it is really valuable, since we can avoid adding elements to the GPtrArray that we won't @@ -16,6 +16,12 @@ (imap4_fetch_all_free): Free the ChangeInfo. (imap4_summary_fetch_all): Init fetch->changes and fetch->first. (imap4_summary_fetch_flags): Same. + (camel_imap4_summary_flush_updates): Only request envelope info if + first <= summary->exists. Avoids needless queries. + (info_uid_sort): #if 0'd + (camel_imap4_summary_flush_updates): No need to sort the summary - + this should never have been needed. I can't remember why I did + this... 2004-06-15 Jeffrey Stedfast <fejj@ximian.com> diff --git a/camel/providers/imap4/camel-imap4-summary.c b/camel/providers/imap4/camel-imap4-summary.c index a91b20dbbc..af53bcef4f 100644 --- a/camel/providers/imap4/camel-imap4-summary.c +++ b/camel/providers/imap4/camel-imap4-summary.c @@ -1163,7 +1163,7 @@ camel_imap4_summary_expunge (CamelFolderSummary *summary, int seqid) camel_folder_change_info_free (changes); } - +#if 0 static int info_uid_sort (const CamelMessageInfo **info0, const CamelMessageInfo **info1) { @@ -1177,6 +1177,7 @@ info_uid_sort (const CamelMessageInfo **info0, const CamelMessageInfo **info1) return uid0 < uid1 ? -1 : 1; } +#endif int camel_imap4_summary_flush_updates (CamelFolderSummary *summary, CamelException *ex) @@ -1218,7 +1219,7 @@ camel_imap4_summary_flush_updates (CamelFolderSummary *summary, CamelException * first = scount + 1; } - if (first != 0 && imap4_summary->exists > 0) { + if (first != 0 && first <= imap4_summary->exists) { ic = imap4_summary_fetch_all (summary, first, 0); while ((id = camel_imap4_engine_iterate (engine)) < ic->id && id != -1) @@ -1234,8 +1235,13 @@ camel_imap4_summary_flush_updates (CamelFolderSummary *summary, CamelException * imap4_fetch_all_add (ic->user_data); camel_imap4_command_unref (ic); +#if 0 + /* Note: this should not be needed - the code that adds envelopes to the summary + * adds them in proper order */ + /* it's important for these to be sorted sequentially for EXPUNGE events to work */ g_ptr_array_sort (summary->messages, (GCompareFunc) info_uid_sort); +#endif } imap4_summary->update_flags = FALSE; |