From: Timo Sirainen Date: Mon, 4 Oct 2021 23:03:00 +0000 (+0300) Subject: lib: istream-concat - Add a comment about explicit snapshot function X-Git-Tag: 2.3.18~212 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5050000f5d299ad63da4aa42f0d37e888f79441e;p=thirdparty%2Fdovecot%2Fcore.git lib: istream-concat - Add a comment about explicit snapshot function --- diff --git a/src/lib/istream-concat.c b/src/lib/istream-concat.c index d034be4ab7..4c58b8653f 100644 --- a/src/lib/istream-concat.c +++ b/src/lib/istream-concat.c @@ -169,7 +169,10 @@ static ssize_t i_stream_concat_read(struct istream_private *stream) else { /* need to read more - NOTE: Can't use i_stream_read_memarea() here, because our stream->buffer may point to the parent - istream. */ + istream. Implementing explicit snapshot function to avoid + this isn't easy for seekable concat-istreams, because due to + seeking it's not necessarily the cur_input that needs to be + snapshotted. */ i_assert(cur_data_pos == data_size); ret = i_stream_read(cstream->cur_input); if (ret == -2 || ret == 0)