dovecot-2.2: lib: Added o_stream_is_corked().

dovecot at dovecot.org dovecot at dovecot.org
Wed May 21 13:22:09 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/8ab8327400cd
changeset: 17384:8ab8327400cd
user:      Timo Sirainen <tss at iki.fi>
date:      Wed May 21 06:21:16 2014 -0700
description:
lib: Added o_stream_is_corked().

diffstat:

 src/lib/ostream.c |  7 +++++++
 src/lib/ostream.h |  1 +
 2 files changed, 8 insertions(+), 0 deletions(-)

diffs (28 lines):

diff -r 090c90714f59 -r 8ab8327400cd src/lib/ostream.c
--- a/src/lib/ostream.c	Thu May 15 23:41:55 2014 +0300
+++ b/src/lib/ostream.c	Wed May 21 06:21:16 2014 -0700
@@ -137,6 +137,13 @@
 	_stream->cork(_stream, FALSE);
 }
 
+bool o_stream_is_corked(struct ostream *stream)
+{
+	struct ostream_private *_stream = stream->real_stream;
+
+	return _stream->corked;
+}
+
 static void o_stream_clear_error(struct ostream *stream)
 {
 	stream->stream_errno = 0;
diff -r 090c90714f59 -r 8ab8327400cd src/lib/ostream.h
--- a/src/lib/ostream.h	Thu May 15 23:41:55 2014 +0300
+++ b/src/lib/ostream.h	Wed May 21 06:21:16 2014 -0700
@@ -84,6 +84,7 @@
    TCP_CORK on if supported. */
 void o_stream_cork(struct ostream *stream);
 void o_stream_uncork(struct ostream *stream);
+bool o_stream_is_corked(struct ostream *stream);
 /* Try to flush the output stream. Returns 1 if all sent, 0 if not,
    -1 if error. */
 int o_stream_flush(struct ostream *stream);


More information about the dovecot-cvs mailing list