Mercurial > dovecot > core-2.2
changeset 2392:dad26f6995ff HEAD
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.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 30 Jul 2004 08:07:50 +0300 |
parents | 6b0901140c16 |
children | d598c82a3c22 |
files | src/lib-index/mail-transaction-log-view.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-index/mail-transaction-log-view.c Fri Jul 30 06:10:05 2004 +0300 +++ b/src/lib-index/mail-transaction-log-view.c Fri Jul 30 08:07:50 2004 +0300 @@ -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;