Skip to content

Commit

Permalink
lib: iostream-temp makes the internal fd visible now to o_stream_get_…
Browse files Browse the repository at this point in the history
…fd()

Mainly for the following unit test.
  • Loading branch information
sirainen committed Feb 24, 2016
1 parent 07448eb commit e245fb1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib/iostream-temp.c
Expand Up @@ -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;
Expand Down

0 comments on commit e245fb1

Please sign in to comment.