[dovecot-cvs] dovecot/src/lib-index mail-transaction-log-view.c, 1.19, 1.20

cras at dovecot.org cras at dovecot.org
Fri Jul 30 08:07:52 EEST 2004


Update of /home/cvs/dovecot/src/lib-index
In directory talvi:/tmp/cvs-serv28533

Modified Files:
	mail-transaction-log-view.c 
Log Message:
mail_transaction_log_view_next() didn't actually stop at the end of view
window, but continued to the end of file. That sometimes caused crashes and
maybe other problems.



Index: mail-transaction-log-view.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib-index/mail-transaction-log-view.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- mail-transaction-log-view.c	18 Jul 2004 12:31:27 -0000	1.19
+++ mail-transaction-log-view.c	30 Jul 2004 05:07:50 -0000	1.20
@@ -248,6 +248,10 @@
 		view->cur_offset = sizeof(struct mail_transaction_log_header);
 	}
 
+	if (view->cur_offset >= view->max_file_offset &&
+	    file->hdr.file_seq == view->max_file_seq)
+		return 0;
+
 	data = buffer_get_data(file->buffer, &file_size);
 	file_size += file->buffer_offset;
 



More information about the dovecot-cvs mailing list