dovecot-1.2: THREAD X-REFERENCES2: Don't return (0) nodes.
dovecot at dovecot.org
dovecot at dovecot.org
Thu Apr 2 22:28:10 EEST 2009
details: http://hg.dovecot.org/dovecot-1.2/rev/bf16646ec312
changeset: 8893:bf16646ec312
user: Timo Sirainen <tss at iki.fi>
date: Thu Apr 02 15:28:03 2009 -0400
description:
THREAD X-REFERENCES2: Don't return (0) nodes.
diffstat:
1 file changed, 10 insertions(+)
src/lib-storage/index/index-thread-finish.c | 10 ++++++++++
diffs (24 lines):
diff -r 66a8cbe7f007 -r bf16646ec312 src/lib-storage/index/index-thread-finish.c
--- a/src/lib-storage/index/index-thread-finish.c Thu Apr 02 15:02:58 2009 -0400
+++ b/src/lib-storage/index/index-thread-finish.c Thu Apr 02 15:28:03 2009 -0400
@@ -420,10 +420,20 @@ static void sort_root_nodes_ref2(struct
const struct mail_thread_node *node;
struct mail_thread_root_node *roots, *root;
struct mail_thread_child_node child;
+ const struct mail_thread_shadow_node *shadows;
unsigned int root_count;
uint32_t idx, parent_idx;
roots = array_get_modifiable(&ctx->roots, &root_count);
+
+ /* drop childless dummy nodes */
+ shadows = array_idx(&ctx->shadow_nodes, 0);
+ for (idx = 1; idx < root_count; idx++) {
+ if (roots[idx].dummy &&
+ shadows[roots[idx].node.idx].first_child_idx == 0)
+ roots[idx].ignore = TRUE;
+ }
+
for (idx = 1; idx < record_count; idx++) {
node = array_idx(&ctx->cache->thread_nodes, idx);
if (!MAIL_THREAD_NODE_EXISTS(node))
More information about the dovecot-cvs
mailing list