[dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-storage.c, 1.148, 1.149
tss at dovecot.org
tss at dovecot.org
Thu Feb 22 13:37:32 UTC 2007
Update of /var/lib/cvs/dovecot/src/lib-storage/index/maildir
In directory talvi:/tmp/cvs-serv13052/maildir
Modified Files:
maildir-storage.c
Log Message:
When using KEEP_LOCK, the mbox/uidlist file must be locked before index file
is opened. Otherwise we can end up in a deadlock.
Index: maildir-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/maildir/maildir-storage.c,v
retrieving revision 1.148
retrieving revision 1.149
diff -u -d -r1.148 -r1.149
--- maildir-storage.c 22 Feb 2007 13:08:35 -0000 1.148
+++ maildir-storage.c 22 Feb 2007 13:37:30 -0000 1.149
@@ -432,8 +432,7 @@
mbox->ibox.storage = istorage;
mbox->ibox.mail_vfuncs = &maildir_mail_vfuncs;
mbox->ibox.is_recent = maildir_is_recent;
-
- index_storage_mailbox_init(&mbox->ibox, index, name, flags, FALSE);
+ mbox->ibox.index = index;
mbox->storage = storage;
mbox->path = p_strdup(pool, path);
@@ -451,7 +450,7 @@
mbox->private_flags_mask = MAIL_SEEN;
}
- if (mbox->ibox.keep_locked) {
+ if ((flags & MAILBOX_OPEN_KEEP_LOCKED) != 0) {
if (maildir_uidlist_lock(mbox->uidlist) <= 0) {
struct mailbox *box = &mbox->ibox.box;
@@ -463,6 +462,7 @@
mbox);
}
+ index_storage_mailbox_init(&mbox->ibox, name, flags, FALSE);
return &mbox->ibox.box;
}
More information about the dovecot-cvs
mailing list