[dovecot-cvs] dovecot/src/lib-index mail-cache.c,1.17,1.18
cras at procontrol.fi
cras at procontrol.fi
Tue Oct 21 07:25:05 EEST 2003
Update of /home/cvs/dovecot/src/lib-index
In directory danu:/tmp/cvs-serv12238/lib-index
Modified Files:
mail-cache.c
Log Message:
compression could have broken header lists
Index: mail-cache.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/mail-cache.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- mail-cache.c 21 Oct 2003 03:14:44 -0000 1.17
+++ mail-cache.c 21 Oct 2003 03:25:03 -0000 1.18
@@ -784,8 +784,15 @@
if (!mmap_update(cache, 0, 0))
ret = FALSE;
}
- cache->index->header->flags &= ~(MAIL_INDEX_HDR_FLAG_REBUILD |
- MAIL_INDEX_HDR_FLAG_COMPRESS_CACHE);
+
+ /* headers could have changed, reread them */
+ memset(cache->split_offsets, 0, sizeof(cache->split_offsets));
+
+ if (ret) {
+ cache->index->header->flags &=
+ ~(MAIL_INDEX_HDR_FLAG_REBUILD |
+ MAIL_INDEX_HDR_FLAG_COMPRESS_CACHE);
+ }
if (!mail_cache_unlock(cache))
ret = FALSE;
More information about the dovecot-cvs
mailing list