[dovecot-cvs] dovecot/src/lib-index mail-index-sync-update.c, 1.96.2.13, 1.96.2.14

tss at dovecot.org tss at dovecot.org
Tue Mar 6 21:51:22 EET 2007


Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv17231

Modified Files:
      Tag: branch_1_0
	mail-index-sync-update.c 
Log Message:
When we were syncing in-memory maps, we still should have updated the
log file offsets because other views could have used them.



Index: mail-index-sync-update.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index-sync-update.c,v
retrieving revision 1.96.2.13
retrieving revision 1.96.2.14
diff -u -d -r1.96.2.13 -r1.96.2.14
--- mail-index-sync-update.c	6 Feb 2007 16:01:20 -0000	1.96.2.13
+++ mail-index-sync-update.c	6 Mar 2007 19:51:20 -0000	1.96.2.14
@@ -91,13 +91,11 @@
 		}
 	}
 
-	if (!MAIL_INDEX_MAP_IS_IN_MEMORY(old_map)) {
-		/* other processes may still have the same file mapped,
-		   and since we could have already updated the records, make
-		   sure we leave the header in a valid state as well */
-		mail_index_sync_update_log_offset(ctx, old_map);
-		(void)mail_index_map_msync(view->index, old_map);
-	}
+	/* some views may still use the same mapping, and since we could have
+	   already updated the records, make sure we leave the header in a
+	   valid state as well */
+	mail_index_sync_update_log_offset(ctx, old_map);
+	(void)mail_index_map_msync(view->index, old_map);
 	mail_index_unmap(view->index, &old_map);
 
 	i_assert(view->hdr.messages_count == map->hdr.messages_count);



More information about the dovecot-cvs mailing list