[evolution-patches] prelude to a fix for bug #42295
- From: Jeffrey Stedfast <fejj ximian com>
- To: evolution-patches ximian com
- Subject: [evolution-patches] prelude to a fix for bug #42295
- Date: 06 May 2003 18:25:13 -0400
The attached patch is meant to the beginnings of a possible fix for bug
#42295.
assuming this is the right direction to fix this, should I add code to
the imap-summary to save the missing count? or do we not care?
if we aren't going to save the 'missing' to the summary, then maybe I
should just move 'missing' to the folder object.
Jeff
--
Jeffrey Stedfast
Evolution Hacker - Ximian, Inc.
fejj ximian com - www.ximian.com
? 42295.patch
? ChangeLog.nonximian
? body
? body.c
? body.txt
? camel-mime-filter-windows.c
? camel-mime-filter-windows.h
? charset-map.c
? charset-map.diff
? cmsutil.c
? date.patch
? debug.patch
? evolution-1.3-gpg.patch
? folder-info-build.patch
? foo
? gpg-verify.patch
? gpg.patch
? html-filter-broken.msg
? imap
? invalid-content-id.patch
? iso
? iso.c
? pop3-uidl.patch
? smime
? win-charset.patch
? tests/mime-filter/test-tohtml
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/camel/ChangeLog,v
retrieving revision 1.1809
diff -u -r1.1809 ChangeLog
--- ChangeLog 4 May 2003 19:11:39 -0000 1.1809
+++ ChangeLog 6 May 2003 22:12:17 -0000
@@ -1,3 +1,11 @@
+2003-05-06 Jeffrey Stedfast <fejj ximian com>
+
+ * providers/imap/camel-imap-folder.c (imap_update_summary): Keep
+ track of the number of missing messages in our Exchange-workaround
+ hack so that we don't get into an infinite loop (which can happen
+ with Cyrus when it exibits the same sort of bug) if the number of
+ missing msgs stays the same. Should address bug #42295.
+
2003-05-02 Dan Winship <danw ximian com>
* camel-mime-part-utils.c
Index: providers/imap/camel-imap-folder.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/providers/imap/camel-imap-folder.c,v
retrieving revision 1.299
diff -u -r1.299 camel-imap-folder.c
--- providers/imap/camel-imap-folder.c 30 Apr 2003 03:09:15 -0000 1.299
+++ providers/imap/camel-imap-folder.c 6 May 2003 22:12:18 -0000
@@ -2390,11 +2390,16 @@
}
g_ptr_array_free (messages, TRUE);
+ missing = (exists - camel_folder_summary_count (folder->summary));
+
/* Kludge around Microsoft Exchange 5.5 IMAP - See bug #5348 for details */
- if (camel_folder_summary_count (folder->summary) != exists) {
+ if (missing && CAMEL_IMAP_SUMMARY (folder->summary)->missing != missing) {
CamelImapStore *imap_store = (CamelImapStore *) folder->parent_store;
CamelImapResponse *response;
+ /* record the number of missing messages so that we don't loop indefinetely (see bug #42295) */
+ CAMEL_IMAP_SUMMARY (folder->summary)->missing = missing;
+
/* forget the currently selected folder */
if (imap_store->current_folder) {
camel_object_unref (CAMEL_OBJECT (imap_store->current_folder));
@@ -2407,6 +2412,9 @@
camel_imap_folder_selected (folder, response, NULL);
camel_imap_response_free (imap_store, response);
}
+ } else {
+ /* in case the number of 'missing' messages drops to 0 */
+ CAMEL_IMAP_SUMMARY (folder->summary)->missing = 0;
}
return;
Index: providers/imap/camel-imap-summary.h
===================================================================
RCS file: /cvs/gnome/evolution/camel/providers/imap/camel-imap-summary.h,v
retrieving revision 1.14
diff -u -r1.14 camel-imap-summary.h
--- providers/imap/camel-imap-summary.h 25 Jul 2002 22:51:58 -0000 1.14
+++ providers/imap/camel-imap-summary.h 6 May 2003 22:12:18 -0000
@@ -56,6 +56,7 @@
CamelFolderSummary parent;
guint32 validity;
+ guint32 missing;
};
struct _CamelImapSummaryClass {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]