[dovecot-cvs] dovecot/src/lib-storage/index/mbox
mbox-sync-rewrite.c, 1.63, 1.64
cras at dovecot.org
cras at dovecot.org
Sat Jun 24 23:54:39 EEST 2006
Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv11767
Modified Files:
mbox-sync-rewrite.c
Log Message:
We assert-crashed in wrong conditions.
Index: mbox-sync-rewrite.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync-rewrite.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- mbox-sync-rewrite.c 24 Jun 2006 20:53:37 -0000 1.63
+++ mbox-sync-rewrite.c 24 Jun 2006 20:54:35 -0000 1.64
@@ -395,9 +395,11 @@
return -1;
}
- need_space = str_len(mail_ctx->header) - mail_ctx->mail.space -
- (mail_ctx->body_offset - mail_ctx->hdr_offset);
- i_assert(need_space == (uoff_t)-mails[idx].space);
+ if (mail_ctx->mail.space <= 0) {
+ need_space = str_len(mail_ctx->header) - mail_ctx->mail.space -
+ (mail_ctx->body_offset - mail_ctx->hdr_offset);
+ i_assert(need_space == (uoff_t)-mails[idx].space);
+ }
if (mails[idx].space == 0) {
/* don't touch spacing */
More information about the dovecot-cvs
mailing list