]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: istream-concat - Add a comment about explicit snapshot function
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 4 Oct 2021 23:03:00 +0000 (02:03 +0300)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Fri, 8 Oct 2021 13:14:15 +0000 (13:14 +0000)
src/lib/istream-concat.c

index d034be4ab7e2491f7431927e166627d504203b1a..4c58b8653f9fb3434d379b490d3e358f3345783b 100644 (file)
@@ -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)