[dovecot-cvs] dovecot/src/lib-index mail-index.c, 1.230.2.19, 1.230.2.20
tss at dovecot.org
tss at dovecot.org
Tue Mar 6 21:11:27 EET 2007
Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv16155
Modified Files:
Tag: branch_1_0
mail-index.c
Log Message:
mail_index_move_to_memory(): Mark index as being in memory even if the file
hasn't been opened yet.
Index: mail-index.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-index.c,v
retrieving revision 1.230.2.19
retrieving revision 1.230.2.20
diff -u -d -r1.230.2.19 -r1.230.2.20
--- mail-index.c 6 Mar 2007 14:23:37 -0000 1.230.2.19
+++ mail-index.c 6 Mar 2007 19:11:25 -0000 1.230.2.20
@@ -1875,16 +1875,16 @@
if (MAIL_INDEX_IS_IN_MEMORY(index))
return 0;
+ /* set the index as being into memory */
+ i_free_and_null(index->dir);
+
if (index->map == NULL) {
- /* mbox file was never even opened. just mark it as being in
+ /* index was never even opened. just mark it as being in
memory and let the caller re-open the index. */
i_assert(index->fd == -1);
return -1;
}
- /* set the index as being into memory */
- i_free_and_null(index->dir);
-
/* move index map to memory */
map = mail_index_map_clone(index->map, index->map->hdr.record_size);
mail_index_unmap(index, &index->map);
More information about the dovecot-cvs
mailing list