[dovecot-cvs]
dovecot/src/lib-storage/index/mbox mbox-sync.c, 1.113, 1.114
cras at dovecot.org
cras at dovecot.org
Tue Oct 26 01:40:58 EEST 2004
Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv25403/lib-storage/index/mbox
Modified Files:
mbox-sync.c
Log Message:
expunge logic still wrong. maybe now?
Index: mbox-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync.c,v
retrieving revision 1.113
retrieving revision 1.114
diff -u -d -r1.113 -r1.114
--- mbox-sync.c 25 Oct 2004 22:10:33 -0000 1.113
+++ mbox-sync.c 25 Oct 2004 22:40:56 -0000 1.114
@@ -629,17 +629,17 @@
needed_space = mail_ctx->mail.space - sync_ctx->space_diff;
if ((uoff_t)sync_ctx->space_diff > needed_space + extra_space) {
/* don't waste too much on padding */
- sync_ctx->expunged_space = mail_ctx->mail.space -
- (needed_space + extra_space);
- sync_ctx->space_diff = needed_space + extra_space;
+ move_diff = needed_space + extra_space;
+ sync_ctx->expunged_space =
+ mail_ctx->mail.space - move_diff;
} else {
- extra_space = sync_ctx->space_diff;
+ move_diff = mail_ctx->mail.space;
+ extra_space = sync_ctx->space_diff - needed_space;
}
last_seq = sync_ctx->seq - 1;
buffer_set_used_size(sync_ctx->mails, sync_ctx->mails->used -
sizeof(mail_ctx->mail));
end_offset = mail_ctx->mail.from_offset;
- move_diff = sync_ctx->space_diff;
} else {
/* this message gave enough space from headers. rewriting stops
at the end of this message's headers. */
More information about the dovecot-cvs
mailing list