aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2002-07-15 10:11:16 +0800
committerMichael Zucci <zucchi@src.gnome.org>2002-07-15 10:11:16 +0800
commitf909a998949fd49da85a63df07431cb7684fba6d (patch)
treea8534bc997ffa53960fd5e997af88d0efa15a1ce
parent393fa3c3e84b73dc591fa4481bcf2731dc640157 (diff)
downloadgsoc2013-evolution-f909a998949fd49da85a63df07431cb7684fba6d.tar
gsoc2013-evolution-f909a998949fd49da85a63df07431cb7684fba6d.tar.gz
gsoc2013-evolution-f909a998949fd49da85a63df07431cb7684fba6d.tar.bz2
gsoc2013-evolution-f909a998949fd49da85a63df07431cb7684fba6d.tar.lz
gsoc2013-evolution-f909a998949fd49da85a63df07431cb7684fba6d.tar.xz
gsoc2013-evolution-f909a998949fd49da85a63df07431cb7684fba6d.tar.zst
gsoc2013-evolution-f909a998949fd49da85a63df07431cb7684fba6d.zip
Only assign a uid if indexing is enabled. This stops us always assigning a
2002-07-13 Not Zed <NotZed@Ximian.com> * camel-folder-summary.c (camel_folder_summary_info_new_from_message): Only assign a uid if indexing is enabled. This stops us always assigning a uid in the imap folder and disco folder? * providers/imap/camel-imap-folder.c (imap_update_summary): Also check the uid is set at all, another bit of a fix for #15667. 2002-07-09 Not Zed <NotZed@Ximian.com> * providers/imap/camel-imap-folder.c (imap_update_summary): Check for existing messages of the same uid before doing anything. If it exists, do nothing (perhaps it should merge?). A dirty hack for #15667. svn path=/trunk/; revision=17450
-rw-r--r--camel/ChangeLog17
-rw-r--r--camel/camel-folder-summary.c5
-rw-r--r--camel/providers/imap/camel-imap-folder.c15
3 files changed, 34 insertions, 3 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index c3610f2bef..18770d4a01 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,20 @@
+2002-07-13 Not Zed <NotZed@Ximian.com>
+
+ * camel-folder-summary.c
+ (camel_folder_summary_info_new_from_message): Only assign a uid if
+ indexing is enabled. This stops us always assigning a uid in the
+ imap folder and disco folder?
+
+ * providers/imap/camel-imap-folder.c (imap_update_summary): Also
+ check the uid is set at all, another bit of a fix for #15667.
+
+2002-07-09 Not Zed <NotZed@Ximian.com>
+
+ * providers/imap/camel-imap-folder.c (imap_update_summary): Check
+ for existing messages of the same uid before doing anything. If
+ it exists, do nothing (perhaps it should merge?). A dirty hack for
+ #15667.
+
2002-07-12 Jeffrey Stedfast <fejj@ximian.com>
* camel-multipart-encrypted.c (camel_multipart_encrypted_decrypt):
diff --git a/camel/camel-folder-summary.c b/camel/camel-folder-summary.c
index d0d24b8820..665ffab795 100644
--- a/camel/camel-folder-summary.c
+++ b/camel/camel-folder-summary.c
@@ -935,8 +935,9 @@ CamelMessageInfo *camel_folder_summary_info_new_from_message(CamelFolderSummary
info = ((CamelFolderSummaryClass *)(CAMEL_OBJECT_GET_CLASS(s)))->message_info_new_from_message(s, msg);
/* assign a unique uid, this is slightly 'wrong' as we do not really
- * know if we are going to store this in the summary, but no matter */
- summary_assign_uid(s, info);
+ * know if we are going to store this in the summary, but we need it set for indexing */
+ if (p->index)
+ summary_assign_uid(s, info);
CAMEL_SUMMARY_LOCK(s, filter_lock);
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c
index 174a551a99..a437024991 100644
--- a/camel/providers/imap/camel-imap-folder.c
+++ b/camel/providers/imap/camel-imap-folder.c
@@ -1964,7 +1964,7 @@ imap_update_summary (CamelFolder *folder, int exists,
int i, seq, first, size, got;
CamelImapResponseType type;
const char *header_spec;
- CamelMessageInfo *mi;
+ CamelMessageInfo *mi, *info;
CamelStream *stream;
char *uid, *resp;
GData *data;
@@ -2186,6 +2186,19 @@ imap_update_summary (CamelFolder *folder, int exists,
g_warning ("No information for message %d", i + first);
continue;
}
+ uid = (char *)camel_message_info_uid(mi);
+ if (uid[0] == 0) {
+ g_warning("Server provided no uid: message %d", i + first);
+ continue;
+ }
+ info = camel_folder_summary_uid(folder->summary, uid);
+ if (info) {
+ g_warning("Message already present? %s", camel_message_info_uid(mi));
+ camel_folder_summary_info_free(folder->summary, info);
+ camel_folder_summary_info_free(folder->summary, mi);
+ continue;
+ }
+
camel_folder_summary_add (folder->summary, mi);
camel_folder_change_info_add_uid (changes, camel_message_info_uid (mi));