[dovecot-cvs] dovecot/src/lib-index mail-modifylog.c,1.41,1.42
cras at procontrol.fi
cras at procontrol.fi
Thu Jan 23 20:51:23 EET 2003
Update of /home/cvs/dovecot/src/lib-index
In directory danu:/tmp/cvs-serv29257
Modified Files:
mail-modifylog.c
Log Message:
Modifylog wasn't written for external changes (broken by the previous
speedup)
Index: mail-modifylog.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/mail-modifylog.c,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- mail-modifylog.c 22 Jan 2003 20:34:52 -0000 1.41
+++ mail-modifylog.c 23 Jan 2003 18:51:20 -0000 1.42
@@ -710,32 +710,33 @@
i_assert((*rec)->seq1 != 0);
i_assert((*rec)->uid1 != 0);
- if (!external_change &&
- file->log->cache_lock_counter !=
- file->log->index->excl_lock_counter) {
- switch (modifylog_have_other_users(file->log, FALSE)) {
- case 0:
- /* we're the only one having this log open,
- no need for modify log. */
- file->log->cache_have_others = FALSE;
- file->log->cache_lock_counter =
- file->log->index->excl_lock_counter;
+ if (!external_change) {
+ if (file->log->cache_lock_counter !=
+ file->log->index->excl_lock_counter) {
+ switch (modifylog_have_other_users(file->log, FALSE)) {
+ case 0:
+ /* we're the only one having this log open,
+ no need for modify log. */
+ file->log->cache_have_others = FALSE;
+ file->log->cache_lock_counter =
+ file->log->index->excl_lock_counter;
+ *rec = NULL;
+ return TRUE;
+ case -1:
+ return FALSE;
+ default:
+ file->log->cache_have_others = TRUE;
+ file->log->cache_lock_counter =
+ file->log->index->excl_lock_counter;
+ break;
+ }
+ }
+
+ if (!file->log->cache_have_others) {
*rec = NULL;
return TRUE;
- case -1:
- return FALSE;
- default:
- file->log->cache_have_others = TRUE;
- file->log->cache_lock_counter =
- file->log->index->excl_lock_counter;
- break;
}
- }
-
- if (!file->log->cache_have_others) {
- *rec = NULL;
- return TRUE;
}
if (file->mmap_used_length == file->mmap_full_length) {
More information about the dovecot-cvs
mailing list