From: Timo Sirainen Date: Mon, 29 Feb 2016 20:10:06 +0000 (+0200) Subject: lib: iostream-temp allows now calling o_stream_seek() on it. X-Git-Tag: 2.2.22.rc1~15 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=153ed0fbca1f5f944b70937dfd71911db172ca97;p=thirdparty%2Fdovecot%2Fcore.git lib: iostream-temp allows now calling o_stream_seek() on it. --- diff --git a/src/lib/iostream-temp.c b/src/lib/iostream-temp.c index 2b15f2c45c..5fe4fc4b5a 100644 --- a/src/lib/iostream-temp.c +++ b/src/lib/iostream-temp.c @@ -216,6 +216,12 @@ o_stream_temp_write_at(struct ostream_private *stream, return 0; } +static int o_stream_temp_seek(struct ostream_private *_stream, uoff_t offset) +{ + _stream->ostream.offset = offset; + return 0; +} + struct ostream *iostream_temp_create(const char *temp_path_prefix, enum iostream_temp_flags flags) { @@ -242,6 +248,7 @@ struct ostream *iostream_temp_create_sized(const char *temp_path_prefix, tstream->ostream.sendv = o_stream_temp_sendv; tstream->ostream.send_istream = o_stream_temp_send_istream; tstream->ostream.write_at = o_stream_temp_write_at; + tstream->ostream.seek = o_stream_temp_seek; tstream->ostream.iostream.close = o_stream_temp_close; tstream->temp_path_prefix = i_strdup(temp_path_prefix); tstream->flags = flags;