From: Timo Sirainen Date: Wed, 24 Feb 2016 14:39:25 +0000 (+0200) Subject: lib: iostream-temp makes the internal fd visible now to o_stream_get_fd() X-Git-Tag: 2.2.22.rc1~83 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e245fb1302121d2bc2580f61e040c2c8a558ee9e;p=thirdparty%2Fdovecot%2Fcore.git lib: iostream-temp makes the internal fd visible now to o_stream_get_fd() Mainly for the following unit test. --- diff --git a/src/lib/iostream-temp.c b/src/lib/iostream-temp.c index 134362c9f2..2b15f2c45c 100644 --- a/src/lib/iostream-temp.c +++ b/src/lib/iostream-temp.c @@ -68,6 +68,9 @@ static int o_stream_temp_move_to_fd(struct temp_ostream *tstream) i_close_fd(&tstream->fd); return -1; } + /* make the fd available also to o_stream_get_fd(), + e.g. for unit tests */ + tstream->ostream.fd = tstream->fd; tstream->fd_size = tstream->buf->used; buffer_free(&tstream->buf); return 0;