From e245fb1302121d2bc2580f61e040c2c8a558ee9e Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Wed, 24 Feb 2016 16:39:25 +0200 Subject: [PATCH] lib: iostream-temp makes the internal fd visible now to o_stream_get_fd() Mainly for the following unit test. --- src/lib/iostream-temp.c | 3 +++ 1 file changed, 3 insertions(+) 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; -- 2.47.3