[dovecot-cvs] dovecot/src/lib-index mail-transaction-log-view.c,
1.23, 1.24
cras at dovecot.org
cras at dovecot.org
Sat Aug 28 15:45:44 EEST 2004
Update of /home/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv24300
Modified Files:
mail-transaction-log-view.c
Log Message:
Handle correctly the case when index hasn't yet been synced with transaction
log.
Index: mail-transaction-log-view.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/mail-transaction-log-view.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- mail-transaction-log-view.c 14 Aug 2004 22:58:39 -0000 1.23
+++ mail-transaction-log-view.c 28 Aug 2004 12:45:42 -0000 1.24
@@ -88,6 +88,17 @@
if (view->log == NULL)
return -1;
+ if (min_file_seq == 0) {
+ /* new index, transaction file not synced yet */
+ min_file_seq = 1;
+ min_file_offset = sizeof(struct mail_transaction_log_header);
+
+ if (max_file_seq == 0) {
+ max_file_seq = min_file_seq;
+ max_file_offset = min_file_offset;
+ }
+ }
+
if (min_file_seq == view->log->tail->hdr.prev_file_seq &&
min_file_offset == view->log->tail->hdr.prev_file_offset) {
/* we can skip this */
More information about the dovecot-cvs
mailing list