dovecot-2.0: mbox: Fixed assert-crashing on failures with read-o...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Jul 26 21:21:53 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/4d5158130e2c
changeset: 11903:4d5158130e2c
user: Timo Sirainen <tss at iki.fi>
date: Mon Jul 26 19:21:47 2010 +0100
description:
mbox: Fixed assert-crashing on failures with read-only mboxes
diffstat:
src/lib-storage/index/mbox/mbox-sync.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (23 lines):
diff -r bab22fff6d25 -r 4d5158130e2c src/lib-storage/index/mbox/mbox-sync.c
--- a/src/lib-storage/index/mbox/mbox-sync.c Mon Jul 26 19:11:13 2010 +0100
+++ b/src/lib-storage/index/mbox/mbox-sync.c Mon Jul 26 19:21:47 2010 +0100
@@ -1592,8 +1592,9 @@
if (sync_ctx->delay_writes &&
(sync_ctx->errors || sync_ctx->renumber_uids)) {
/* fixing a broken mbox state, be sure to write
- the changes. */
- sync_ctx->delay_writes = FALSE;
+ the changes (except if we're readonly). */
+ if (!sync_ctx->readonly)
+ sync_ctx->delay_writes = FALSE;
}
if (++i == 3)
break;
@@ -1791,6 +1792,7 @@
if (mbox_lock(mbox, F_RDLCK, lock_id) <= 0)
return -1;
mbox->box.backend_readonly = readonly = TRUE;
+ delay_writes = TRUE;
}
}
More information about the dovecot-cvs
mailing list