dovecot-2.2: lib-test: Fixed test istream

dovecot at dovecot.org dovecot at dovecot.org
Wed Jun 20 02:45:39 EEST 2012


details:   http://hg.dovecot.org/dovecot-2.2/rev/e84f49c08458
changeset: 14608:e84f49c08458
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Jun 20 02:44:57 2012 +0300
description:
lib-test: Fixed test istream

diffstat:

 src/lib-test/test-common.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (39 lines):

diff -r 68a8b650578e -r e84f49c08458 src/lib-test/test-common.c
--- a/src/lib-test/test-common.c	Wed Jun 20 02:44:35 2012 +0300
+++ b/src/lib-test/test-common.c	Wed Jun 20 02:44:57 2012 +0300
@@ -17,7 +17,7 @@
 struct test_istream {
 	struct istream_private istream;
 	unsigned int skip_diff;
-	size_t max_pos, max_buffer_size;
+	size_t max_pos;
 	bool allow_eof;
 };
 
@@ -29,7 +29,7 @@
 
 	i_assert(stream->skip <= stream->pos);
 
-	if (stream->pos - stream->skip >= tstream->max_buffer_size)
+	if (stream->pos - stream->skip >= tstream->istream.max_buffer_size)
 		return -2;
 
 	if (tstream->max_pos < stream->pos) {
@@ -88,7 +88,7 @@
 	(void)i_stream_create(&tstream->istream, NULL, -1);
 	tstream->istream.statbuf.st_size = tstream->max_pos = size;
 	tstream->allow_eof = TRUE;
-	tstream->max_buffer_size = (size_t)-1;
+	tstream->istream.max_buffer_size = (size_t)-1;
 	return &tstream->istream.istream;
 }
 
@@ -110,7 +110,7 @@
 	struct test_istream *tstream =
 		(struct test_istream *)input->real_stream;
 
-	tstream->max_buffer_size = size;
+	tstream->istream.max_buffer_size = size;
 }
 
 void test_istream_set_size(struct istream *input, uoff_t size)


More information about the dovecot-cvs mailing list