[dovecot-cvs] dovecot/src/lib-storage/index/mbox mbox-sync.c, 1.200, 1.201
tss at dovecot.org
tss at dovecot.org
Wed Mar 7 17:35:01 EET 2007
Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv32143
Modified Files:
mbox-sync.c
Log Message:
minor cleanups
Index: mbox-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync.c,v
retrieving revision 1.200
retrieving revision 1.201
diff -u -d -r1.200 -r1.201
--- mbox-sync.c 28 Feb 2007 19:55:32 -0000 1.200
+++ mbox-sync.c 7 Mar 2007 15:34:58 -0000 1.201
@@ -941,7 +941,7 @@
if (seq1 == 0) {
/* doesn't exist anymore, seek to end of file */
- st = i_stream_stat(sync_ctx->mbox->mbox_file_stream, TRUE);
+ st = i_stream_stat(sync_ctx->file_input, TRUE);
if (st == NULL) {
mbox_set_syscall_error(sync_ctx->mbox,
"i_stream_stat()");
@@ -1477,8 +1477,7 @@
st = i_stream_stat(sync_ctx->file_input, FALSE);
if (st == NULL) {
- mbox_set_syscall_error(sync_ctx->mbox,
- "i_stream_stat()");
+ mbox_set_syscall_error(sync_ctx->mbox, "i_stream_stat()");
return -1;
}
@@ -1786,7 +1785,9 @@
ret = mbox_rewrite_base_uid_last(&sync_ctx);
}
- if (lock_id != 0 && mbox->mbox_lock_type != F_RDLCK) {
+ i_assert(lock_id != 0);
+
+ if (mbox->mbox_lock_type != F_RDLCK) {
/* drop to read lock */
unsigned int read_lock_id = 0;
@@ -1799,11 +1800,7 @@
}
}
- if (lock_id != 0 && (flags & MBOX_SYNC_LOCK_READING) == 0) {
- /* FIXME: keep the lock MBOX_SYNC_SECS+1 to make sure we
- notice changes made by others .. and this has to be done
- even if lock_reading is set.. except if
- mbox_sync_dirty = TRUE */
+ if ((flags & MBOX_SYNC_LOCK_READING) == 0) {
if (mbox_unlock(mbox, lock_id) < 0)
ret = -1;
}
More information about the dovecot-cvs
mailing list