dovecot-2.2: istream-chain: Support using io_add_istream() for t...

dovecot at dovecot.org dovecot at dovecot.org
Fri Aug 15 12:25:02 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/664afffb22a3
changeset: 17721:664afffb22a3
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Aug 15 15:22:46 2014 +0300
description:
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.

diffstat:

 src/lib/istream-chain.c |  3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diffs (13 lines):

diff -r 7985461cf21c -r 664afffb22a3 src/lib/istream-chain.c
--- 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)


More information about the dovecot-cvs mailing list