dovecot-2.1: lib-ssl-iostream: Handle flush_pending and set_max_...
dovecot at dovecot.org
dovecot at dovecot.org
Wed Sep 7 11:19:20 EEST 2011
details: http://hg.dovecot.org/dovecot-2.1/rev/4b707b98176e
changeset: 13421:4b707b98176e
user: Timo Sirainen <tss at iki.fi>
date: Wed Sep 07 11:19:03 2011 +0300
description:
lib-ssl-iostream: Handle flush_pending and set_max_buffer_size properly.
diffstat:
src/lib-ssl-iostream/ostream-openssl.c | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diffs (38 lines):
diff -r de7f3810589a -r 4b707b98176e src/lib-ssl-iostream/ostream-openssl.c
--- a/src/lib-ssl-iostream/ostream-openssl.c Wed Sep 07 11:18:15 2011 +0300
+++ b/src/lib-ssl-iostream/ostream-openssl.c Wed Sep 07 11:19:03 2011 +0300
@@ -210,6 +210,23 @@
return ret > 0 && ret2 > 0 ? 1 : 0;
}
+static void
+o_stream_ssl_flush_pending(struct ostream_private *_stream, bool set)
+{
+ struct ssl_ostream *sstream = (struct ssl_ostream *)_stream;
+
+ o_stream_set_flush_pending(sstream->ssl_io->plain_output, set);
+}
+
+static void o_stream_ssl_set_max_buffer_size(struct iostream_private *_stream,
+ size_t max_size)
+{
+ struct ssl_ostream *sstream = (struct ssl_ostream *)_stream;
+
+ sstream->ostream.max_buffer_size = max_size;
+ o_stream_set_max_buffer_size(sstream->ssl_io->plain_output, max_size);
+}
+
struct ostream *o_stream_create_ssl(struct ssl_iostream *ssl_io)
{
struct ssl_ostream *sstream;
@@ -226,6 +243,10 @@
sstream->ostream.flush = o_stream_ssl_flush;
sstream->ostream.switch_ioloop = o_stream_ssl_switch_ioloop;
+ sstream->ostream.flush_pending = o_stream_ssl_flush_pending;
+ sstream->ostream.iostream.set_max_buffer_size =
+ o_stream_ssl_set_max_buffer_size;
+
sstream->ostream.callback = ssl_io->plain_output->real_stream->callback;
sstream->ostream.context = ssl_io->plain_output->real_stream->context;
o_stream_set_flush_callback(ssl_io->plain_output,
More information about the dovecot-cvs
mailing list