Mercurial > dovecot > original-hg > dovecot-2.2
changeset 17721:664afffb22a3
istream-chain: Support using io_add_istream() for the chain stream.
The callback is notified whenever new streams are added to the chain.
It's currently not possible to have nonblocking istreams added to the chain
and the callback being called when they have new data, but it would be
possible to implement as well if needed at some point.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 15 Aug 2014 15:22:46 +0300 |
parents | 7985461cf21c |
children | 8e6d2afb14c5 |
files | src/lib/istream-chain.c |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib/istream-chain.c Fri Aug 15 15:19:24 2014 +0300 +++ b/src/lib/istream-chain.c Fri Aug 15 15:22:46 2014 +0300 @@ -54,6 +54,9 @@ } } DLLIST2_APPEND(&chain->head, &chain->tail, link); + /* if io_add_istream() has been added to this chain stream, notify + the callback that we have more data available. */ + i_stream_set_input_pending(stream, TRUE); } void i_stream_chain_append(struct istream_chain *chain, struct istream *stream)