[dovecot-cvs] dovecot/src/lib-storage/index/maildir maildir-storage.c, 1.115.2.24, 1.115.2.25
tss at dovecot.org
tss at dovecot.org
Thu Feb 22 13:37:37 UTC 2007
Update of /var/lib/cvs/dovecot/src/lib-storage/index/maildir
In directory talvi:/tmp/cvs-serv13056/maildir
Modified Files:
Tag: branch_1_0
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.115.2.24
retrieving revision 1.115.2.25
diff -u -d -r1.115.2.24 -r1.115.2.25
--- maildir-storage.c 22 Feb 2007 13:08:30 -0000 1.115.2.24
+++ maildir-storage.c 22 Feb 2007 13:37:32 -0000 1.115.2.25
@@ -518,12 +518,7 @@
mbox->ibox.storage = istorage;
mbox->ibox.mail_vfuncs = &maildir_mail_vfuncs;
mbox->ibox.is_recent = maildir_is_recent;
-
- if (index_storage_mailbox_init(&mbox->ibox, index, name, flags,
- FALSE) < 0) {
- /* the memory was already freed */
- return NULL;
- }
+ mbox->ibox.index = index;
mbox->storage = storage;
mbox->path = p_strdup(pool, path);
@@ -541,7 +536,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;
@@ -553,6 +548,7 @@
mbox);
}
+ index_storage_mailbox_init(&mbox->ibox, name, flags, FALSE);
return &mbox->ibox.box;
}
More information about the dovecot-cvs
mailing list