+2001-11-11 [alfons] 0.6.5.claws5
+
+ * src/procmsg.c
+ prevent threading by subject on nodes that have already been
+ threaded by in-reply-to (as in "circular references in a tree
+ result in a dead branch")
+
2001-11-09 [hoa] 0.6.5.claws4
* src/folderview.c
allows creation of mbox folder item from any files.
-2001-11-07 [alfons] 0.6.5.claws3
+2001-11-09 [alfons] 0.6.5.claws3
* src/utils.c
* src/procmsg.c
next = node->next;
msginfo = (MsgInfo *)node->data;
parent = NULL;
-
- if (msginfo->inreplyto)
+ /* CLAWS: ignore thread */
+ if (msginfo->inreplyto)
parent = g_hash_table_lookup(msgid_table, msginfo->inreplyto);
- if (parent == NULL && subject_is_reply(msginfo->subject))
- parent = subject_table_lookup(subject_table, msginfo->subject);
-
if (parent && parent != node) {
g_node_unlink(node);
g_node_insert_before
node = next;
}
+ /* CLAWS: now see if the first level (below root) still has some nodes that can be
+ * threaded by subject line. we need to handle this in a special way to prevent
+ * circular reference from a node that has already been threaded by IN-REPLY-TO
+ * but is also in the subject line hash table */
+ for (node = root->children; node != NULL; ) {
+ next = node->next;
+ msginfo = (MsgInfo *) node->data;
+ parent = NULL;
+ if (subject_is_reply(msginfo->subject)) {
+ if (NULL != (parent = subject_table_lookup(subject_table, msginfo->subject))) {
+ /* the node may already be threaded by IN-REPLY-TO, so go up in the
+ * tree to find the parent node */
+ for (; parent->parent && parent->parent != root; parent = parent->parent)
+ ;
+ }
+ }
+ if (parent && parent != node) {
+ g_node_unlink(node);
+ g_node_append(parent, node);
+ }
+ node = next;
+ }
+
g_hash_table_destroy(subject_table);
g_hash_table_destroy(msgid_table);