Mercurial > dovecot > original-hg > dovecot-1.2
changeset 8801:60e778555558 HEAD
mbox: Possible assert-crashfix. Also added some comments.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 04 Mar 2009 18:03:23 -0500 |
parents | ce28325cc1c4 |
children | f93d9e08f89c |
files | src/lib-storage/index/mbox/istream-raw-mbox.c |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/mbox/istream-raw-mbox.c Mon Mar 02 22:16:15 2009 -0500 +++ b/src/lib-storage/index/mbox/istream-raw-mbox.c Wed Mar 04 18:03:23 2009 -0500 @@ -183,9 +183,13 @@ if (ret == -2) { if (stream->istream.v_offset + pos == rstream->input_peak_offset) { + /* we've read everything our parent stream + has to offer. */ stream->buffer = buf; return -2; } + /* parent stream is full, but we haven't returned + all its bytes to our caller yet. */ } else if (stream->istream.v_offset != 0 || pos == 0) { /* we've read the whole file, final byte should be the \n trailer */ @@ -364,6 +368,7 @@ rstream->istream.skip = 0; rstream->istream.pos = 0; + rstream->input_peak_offset = 0; } static const struct stat *