dovecot-1.2: Maildir: If uidlist couldn't be locked while saving...
dovecot at dovecot.org
dovecot at dovecot.org
Sun Jul 20 20:18:00 EEST 2008
details: http://hg.dovecot.org/dovecot-1.2/rev/09295548c123
changeset: 8025:09295548c123
user: Timo Sirainen <tss at iki.fi>
date: Sun Jul 20 20:17:46 2008 +0300
description:
Maildir: If uidlist couldn't be locked while saving, we might have assert-crashed
afterwards when trying to update cache file for the newly saved message
whose index update was already cancelled.
diffstat:
1 file changed, 6 insertions(+), 1 deletion(-)
src/lib-storage/index/index-mail.c | 7 ++++++-
diffs (17 lines):
diff -r 8cb32b10a536 -r 09295548c123 src/lib-storage/index/index-mail.c
--- a/src/lib-storage/index/index-mail.c Sun Jul 20 19:45:39 2008 +0300
+++ b/src/lib-storage/index/index-mail.c Sun Jul 20 20:17:46 2008 +0300
@@ -1082,7 +1082,12 @@ void index_mail_close(struct mail *_mail
struct index_mail *mail = (struct index_mail *)_mail;
struct message_part *parts;
- if (mail->mail.mail.seq != 0) {
+ /* If uid == 0 but seq != 0, we came here from saving a (non-mbox)
+ message. If that happens, don't bother checking if anything should
+ be cached since it was already checked. Also by now the transaction
+ may have already been rollbacked and seq point to a non-existing
+ message. */
+ if (mail->mail.mail.uid != 0) {
index_mail_cache_sizes(mail);
index_mail_cache_dates(mail);
}
More information about the dovecot-cvs
mailing list