[dovecot-cvs] dovecot/src/lib-index mail-transaction-log.c, 1.54,
1.55
cras at dovecot.org
cras at dovecot.org
Sat Sep 11 19:14:13 EEST 2004
Update of /var/lib/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv13681
Modified Files:
mail-transaction-log.c
Log Message:
if there's pending cache_reset in log file make sure appended records don't
have invalid cache_offsets.
Index: mail-transaction-log.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-index/mail-transaction-log.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- mail-transaction-log.c 5 Sep 2004 17:53:45 -0000 1.54
+++ mail-transaction-log.c 11 Sep 2004 16:14:10 -0000 1.55
@@ -1044,6 +1044,17 @@
t->cache_updates != NULL) {
buffer_free(t->cache_updates);
t->cache_updates = NULL;
+
+ if (t->appends != NULL) {
+ struct mail_index_record *rec;
+ size_t i, size;
+
+ rec = buffer_get_modifyable_data(t->appends, &size);
+ size /= sizeof(*rec);
+
+ for (i = 0; i < size; i++)
+ rec[i].cache_offset = 0;
+ }
}
mail_transaction_log_view_close(sync_view);
More information about the dovecot-cvs
mailing list