changeset 22149:562c621a9073

lib-storage: Fix setting the correct cache record corrupted It was mixing UIDs and sequences, so a wrong mail could have been set corrupted or it could have crashed with: Panic: file mail-index-transaction-update.c: line 1018 (mail_index_update_ext): assertion failed: (seq > 0 && (seq <= mail_index_view_get_messages_count(t->view) || seq <= t->last_new_seq))
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Fri, 09 Jun 2017 14:31:15 +0300
parents 3272674e4e5d
children a094a555a5c3
files src/lib-storage/mail-storage.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/mail-storage.c	Fri Jun 09 12:07:00 2017 +0300
+++ b/src/lib-storage/mail-storage.c	Fri Jun 09 14:31:15 2017 +0300
@@ -2754,7 +2754,7 @@
 	va_start(va, fmt);
 
 	T_BEGIN {
-		mail_cache_set_seq_corrupted_reason(cache_view, mail->uid,
+		mail_cache_set_seq_corrupted_reason(cache_view, mail->seq,
 			t_strdup_printf("UID %u: %s",
 					mail->uid,
 					t_strdup_vprintf(fmt, va)));