[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-mail.c, 1.28,
1.29
cras at dovecot.org
cras at dovecot.org
Fri Dec 30 15:05:52 EET 2005
Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv21325
Modified Files:
mbox-mail.c
Log Message:
If mbox offsets are dirty and the mbox is write-locked (eg. copying mails to
box), we got to infinite loop.
Index: mbox-mail.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-mail.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- mbox-mail.c 16 Jun 2005 09:01:59 -0000 1.28
+++ mbox-mail.c 30 Dec 2005 13:05:50 -0000 1.29
@@ -55,6 +55,11 @@
i_assert(mbox->mbox_lock_type != F_UNLCK);
t->mbox_lock_id = mbox->mbox_lock_id;
+ } else if ((sync_flags & MBOX_SYNC_FORCE_SYNC) != 0) {
+ /* dirty offsets are broken and mbox is write-locked.
+ sync it to update offsets. */
+ if (mbox_sync(mbox, sync_flags) < 0)
+ return -1;
}
if (mbox_file_open_stream(mbox) < 0)
More information about the dovecot-cvs
mailing list