[dovecot-cvs] dovecot/src/lib-index mail-index.c, 1.139,
1.140 mail-index-lock.c, 1.23, 1.24 mail-index-private.h, 1.24, 1.25
cras at dovecot.org
cras at dovecot.org
Thu Jul 8 21:57:20 EEST 2004
Update of /home/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv32546
Modified Files:
mail-index.c mail-index-lock.c mail-index-private.h
Log Message:
crashfix
Index: mail-index.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/mail-index.c,v
retrieving revision 1.139
retrieving revision 1.140
diff -u -d -r1.139 -r1.140
--- mail-index.c 3 Jul 2004 20:17:37 -0000 1.139
+++ mail-index.c 8 Jul 2004 18:57:16 -0000 1.140
@@ -402,6 +402,7 @@
map->log_file_seq = map->hdr->log_file_seq;
map->log_file_offset = map->hdr->log_file_offset;
+ map->base_header_size = map->hdr->base_header_size;
index->hdr = map->hdr;
index->map = map;
Index: mail-index-lock.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/mail-index-lock.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- mail-index-lock.c 24 Jun 2004 11:10:41 -0000 1.23
+++ mail-index-lock.c 8 Jul 2004 18:57:17 -0000 1.24
@@ -255,7 +255,7 @@
/* if header size is smaller than what we have, we'll have to recreate
the index to grow it. so don't even try regular locking. */
if (index->map->hdr != &index->map->hdr_copy &&
- index->map->hdr->base_header_size == sizeof(*index->hdr)) {
+ index->map->base_header_size == sizeof(*index->hdr)) {
/* wait two seconds for exclusive lock */
ret = mail_index_lock(index, F_WRLCK, 2, TRUE, lock_id_r);
if (ret > 0)
Index: mail-index-private.h
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/mail-index-private.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- mail-index-private.h 4 Jul 2004 21:56:12 -0000 1.24
+++ mail-index-private.h 8 Jul 2004 18:57:17 -0000 1.25
@@ -51,6 +51,7 @@
uoff_t log_file_offset;
struct mail_index_header hdr_copy;
+ uint32_t base_header_size; /* so we don't need lock to access it */
unsigned int write_to_disk:1;
};
More information about the dovecot-cvs
mailing list