Make sure stream->offset points to the position in stream corresponding to the start of the buffer.
* libmailutils/stream/stream.c (_stream_fill_buffer): Keep track of the current offset. (mu_stream_seek): avoid unnecessary seeks. (_stream_skip_input_bytes): Call _stream_flush_buffer before _stream_fill_buffer. (_stream_write_unbuffered): Do not modify current offset. (mu_stream_read,mu_stream_write): For unbuffered streams, modify current offset after invoking the corresponding I/O call. (_stream_scandelim): Call _stream_flush_buffer before _stream_fill_buffer.
Showing
1 changed file
with
95 additions
and
66 deletions
-
Please register or sign in to post a comment