dovecot: If view is inconsistent, keep mail->seq valid anyway.
dovecot at dovecot.org
dovecot at dovecot.org
Sat Sep 15 13:07:50 EEST 2007
details: http://hg.dovecot.org/dovecot/rev/15defb570164
changeset: 6387:15defb570164
user: Timo Sirainen <tss at iki.fi>
date: Sat Sep 15 13:07:46 2007 +0300
description:
If view is inconsistent, keep mail->seq valid anyway.
diffstat:
1 file changed, 8 insertions(+), 9 deletions(-)
src/lib-storage/index/index-mail.c | 17 ++++++++---------
diffs (34 lines):
diff -r 1d993d28e12f -r 15defb570164 src/lib-storage/index/index-mail.c
--- a/src/lib-storage/index/index-mail.c Sat Sep 15 13:07:01 2007 +0300
+++ b/src/lib-storage/index/index-mail.c Sat Sep 15 13:07:46 2007 +0300
@@ -978,6 +978,9 @@ void index_mail_set_seq(struct mail *_ma
data->seq = seq;
data->flags = rec->flags & MAIL_FLAGS_NONRECENT;
+ mail->mail.mail.seq = seq;
+ mail->mail.mail.uid = rec->uid;
+
if (mail_index_view_is_inconsistent(mail->trans->trans_view)) {
mail_set_expunged(&mail->mail.mail);
return;
@@ -989,15 +992,11 @@ void index_mail_set_seq(struct mail *_ma
(void)index_mail_get_fixed_field(mail, MAIL_CACHE_FLAGS,
&data->cache_flags,
sizeof(data->cache_flags));
- }
-
- /* set public fields */
- mail->mail.mail.seq = seq;
- mail->mail.mail.uid = rec->uid;
- mail->mail.mail.has_nuls =
- (data->cache_flags & MAIL_CACHE_FLAG_HAS_NULS) != 0;
- mail->mail.mail.has_no_nuls =
- (data->cache_flags & MAIL_CACHE_FLAG_HAS_NO_NULS) != 0;
+ mail->mail.mail.has_nuls =
+ (data->cache_flags & MAIL_CACHE_FLAG_HAS_NULS) != 0;
+ mail->mail.mail.has_no_nuls =
+ (data->cache_flags & MAIL_CACHE_FLAG_HAS_NO_NULS) != 0;
+ }
/* see if wanted_fields can tell us if we need to read/parse
header/body */
More information about the dovecot-cvs
mailing list