[prev in list] [next in list] [prev in thread] [next in thread]
List: dovecot-cvs
Subject: [dovecot-cvs] dovecot/src/lib-storage/index/mbox
From: cras () dovecot ! org (cras () dovecot ! org)
Date: 2005-10-28 17:01:33
Message-ID: 20051028140132.1EFA3C000099 () talvi ! dovecot ! org
[Download RAW message or body]
Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv27266
Modified Files:
mbox-sync-rewrite.c
Log Message:
Set mail_ctx=NULL always after doing something for the last mail, even if we
didn't rewrite its headers. Otherwise internal state breaks and we'll crash.
Index: mbox-sync-rewrite.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync-rewrite.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- mbox-sync-rewrite.c 27 Oct 2005 12:12:57 -0000 1.55
+++ mbox-sync-rewrite.c 28 Oct 2005 14:01:28 -0000 1.56
@@ -375,6 +375,7 @@
expunged_space);
mail_ctx = &new_mail_ctx;
} else {
+ i_assert(seq == mail_ctx->seq);
if (mail_ctx->mail.space < 0)
mail_ctx->mail.space = 0;
}
@@ -500,7 +501,6 @@
ret = -1;
break;
}
- mail_ctx = NULL;
move_diff -= next_move_diff + mails[idx].space;
} else {
/* this mail provides more space. just move it forward
@@ -534,6 +534,7 @@
}
mails[idx].offset += move_diff;
}
+ mail_ctx = NULL;
i_assert(move_diff >= 0 || idx == first_nonexpunged_idx);
i_assert(next_end_offset <= end_offset);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic