[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-sync.c, 1.61,
1.62
cras at dovecot.org
cras at dovecot.org
Fri Jul 30 11:30:19 EEST 2004
Update of /home/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv32159/lib-storage/index/mbox
Modified Files:
mbox-sync.c
Log Message:
Don't try to write-lock read-only mboxes
Index: mbox-sync.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- mbox-sync.c 30 Jul 2004 05:08:36 -0000 1.61
+++ mbox-sync.c 30 Jul 2004 08:30:16 -0000 1.62
@@ -1118,7 +1118,8 @@
lock it for writing immediately. the mbox must be locked
before index syncing is started to avoid deadlocks, so we
don't have much choice either (well, easy ones anyway). */
- if (mbox_lock(ibox, F_WRLCK, &lock_id) <= 0)
+ int lock_type = ibox->mbox_readonly ? F_RDLCK : F_WRLCK;
+ if (mbox_lock(ibox, lock_type, &lock_id) <= 0)
return -1;
}
More information about the dovecot-cvs
mailing list