dovecot-1.1: THREAD fixes: If sent date isn't usable, fallback t...
dovecot at dovecot.org
dovecot at dovecot.org
Sat Mar 8 05:48:06 EET 2008
details: http://hg.dovecot.org/dovecot-1.1/rev/dbbb91f70719
changeset: 7379:dbbb91f70719
user: Timo Sirainen <tss at iki.fi>
date: Sat Mar 08 05:48:02 2008 +0200
description:
THREAD fixes: If sent date isn't usable, fallback to received date. If
thread building would introduce loop, the message should not have a parent
then.
diffstat:
1 file changed, 7 insertions(+), 3 deletions(-)
src/imap/imap-thread.c | 10 +++++++---
diffs (31 lines):
diff -r 1570eb502366 -r dbbb91f70719 src/imap/imap-thread.c
--- a/src/imap/imap-thread.c Sat Mar 08 04:40:38 2008 +0200
+++ b/src/imap/imap-thread.c Sat Mar 08 05:48:02 2008 +0200
@@ -392,13 +392,13 @@ static void link_node(struct thread_cont
return;
}
+ if (child->parent != NULL)
+ unlink_child(ctx, child, FALSE);
+
if (find_parent(parent, child)) {
/* this would create a loop, not allowed */
return;
}
-
- if (child->parent != NULL)
- unlink_child(ctx, child, FALSE);
/* link them */
child->parent = parent;
@@ -449,6 +449,10 @@ static void mail_thread_input(struct thr
if (mail_get_date(mail, &sent_date, NULL) < 0)
sent_date = 0;
+ if (sent_date == 0) {
+ if (mail_get_received_date(mail, &sent_date) < 0)
+ sent_date = 0;
+ }
if (mail_get_first_header(mail, "message-id", &message_id) < 0)
message_id = NULL;
More information about the dovecot-cvs
mailing list