aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-folder-thread.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-02-16 03:16:19 +0800
committerDan Winship <danw@src.gnome.org>2001-02-16 03:16:19 +0800
commitcb66ad3fe4a2297ea211adfe012dbdf3f875090b (patch)
treed49ad152890d817359bf312fbaf3a62e6ce5f493 /camel/camel-folder-thread.c
parent3bd759d67e8a3c2d95d7d15385b78dfe5fcdb04b (diff)
downloadgsoc2013-evolution-cb66ad3fe4a2297ea211adfe012dbdf3f875090b.tar.gz
gsoc2013-evolution-cb66ad3fe4a2297ea211adfe012dbdf3f875090b.tar.zst
gsoc2013-evolution-cb66ad3fe4a2297ea211adfe012dbdf3f875090b.zip
Deal with out-of-order References headers so they don't cause messages to
* camel-folder-thread.c (container_parent_child): Deal with out-of-order References headers so they don't cause messages to disappear in threaded view. svn path=/trunk/; revision=8245
Diffstat (limited to 'camel/camel-folder-thread.c')
-rw-r--r--camel/camel-folder-thread.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/camel/camel-folder-thread.c b/camel/camel-folder-thread.c
index af8872c619..3a1c4addde 100644
--- a/camel/camel-folder-thread.c
+++ b/camel/camel-folder-thread.c
@@ -62,6 +62,14 @@ container_parent_child(CamelFolderThreadNode *parent, CamelFolderThreadNode *chi
if (child->parent == parent)
return;
+ /* would this create a loop? */
+ node = parent->parent;
+ while (node) {
+ if (node == child)
+ return;
+ node = node->parent;
+ }
+
/* are we unparented? */
if (child->parent == NULL) {
container_add_child(parent, child);
@@ -99,7 +107,7 @@ prune_empty(CamelFolderThread *thread, CamelFolderThreadNode **cp)
d(printf("checking message %p %p (%08x%08x)\n", c,
c->message, c->message?c->message->message_id.id.part.hi:0,
- c->message->message_uid.id.part.lo:0));
+ c->message?c->message->message_id.id.part.lo:0));
if (c->message == NULL) {
if (c->child == NULL) {
d(printf("removing empty node\n"));
@@ -478,7 +486,7 @@ camel_folder_thread_messages_new(CamelFolder *folder, GPtrArray *uids)
c = e_memchunk_alloc0(thread->node_chunks);
g_hash_table_insert(no_id_table, (void *)mi, c);
} else {
- d(printf("doing : %.8s\n", mi->message_id.id.hash));
+ d(printf("doing : %08x%08x (%s)\n", mi->message_id.id.part.hi, mi->message_id.id.part.lo, camel_message_info_subject(mi)));
c = e_memchunk_alloc0(thread->node_chunks);
g_hash_table_insert(id_table, (void *)&mi->message_id, c);
}