[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-save.c, 1.86,
1.87 mbox-sync.c, 1.170, 1.171
cras at dovecot.org
cras at dovecot.org
Sun Aug 28 15:22:50 EEST 2005
Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv15369
Modified Files:
mbox-save.c mbox-sync.c
Log Message:
Try harder to notice bugs
Index: mbox-save.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-save.c,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -d -r1.86 -r1.87
--- mbox-save.c 12 Jul 2005 12:24:16 -0000 1.86
+++ mbox-save.c 28 Aug 2005 12:22:47 -0000 1.87
@@ -277,6 +277,7 @@
if (ctx->append_offset == (uoff_t)-1) {
/* first appended mail in this transaction */
if (mbox->mbox_lock_type != F_WRLCK) {
+ i_assert(mbox->mbox_lock_type != F_WRLCK);
if (mbox_lock(mbox, F_WRLCK, &t->mbox_lock_id) <= 0)
return -1;
}
Index: mbox-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync.c,v
retrieving revision 1.170
retrieving revision 1.171
diff -u -d -r1.170 -r1.171
--- mbox-sync.c 14 Aug 2005 22:30:56 -0000 1.170
+++ mbox-sync.c 28 Aug 2005 12:22:47 -0000 1.171
@@ -1686,7 +1686,7 @@
sync_ctx.file_input = sync_ctx.mbox->mbox_file_stream;
sync_ctx.input = sync_ctx.mbox->mbox_stream;
- sync_ctx.write_fd = sync_ctx.mbox->mbox_readonly ? -1 :
+ sync_ctx.write_fd = sync_ctx.mbox->mbox_lock_type != F_WRLCK ? -1 :
sync_ctx.mbox->mbox_fd;
ret = mbox_sync_do(&sync_ctx, flags);
More information about the dovecot-cvs
mailing list