Mercurial > dovecot > core-2.2
changeset 11992:136ce9b2e039
Added i_stream_get_max_buffer_size().
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 12 Aug 2010 18:45:52 +0100 |
parents | 11538925cbbb |
children | ae4a82ced01e |
files | src/lib/istream.c src/lib/istream.h |
diffstat | 2 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib/istream.c Thu Aug 12 17:59:03 2010 +0100 +++ b/src/lib/istream.c Thu Aug 12 18:45:52 2010 +0100 @@ -80,6 +80,11 @@ io_stream_set_max_buffer_size(&stream->real_stream->iostream, max_size); } +size_t i_stream_get_max_buffer_size(struct istream *stream) +{ + return stream->real_stream->max_buffer_size; +} + void i_stream_set_return_partial_line(struct istream *stream, bool set) { stream->real_stream->return_nolf_line = set;
--- a/src/lib/istream.h Thu Aug 12 17:59:03 2010 +0100 +++ b/src/lib/istream.h Thu Aug 12 18:45:52 2010 +0100 @@ -72,6 +72,8 @@ /* Change the maximum size for stream's input buffer to grow. Useful only for buffered streams (currently only file). */ void i_stream_set_max_buffer_size(struct istream *stream, size_t max_size); +/* Returns the current max. buffer size. */ +size_t i_stream_get_max_buffer_size(struct istream *stream); /* Enable/disable i_stream[_read]_next_line() returning the last line if it doesn't end with LF. */ void i_stream_set_return_partial_line(struct istream *stream, bool set);