dovecot-2.2: lib: Added extra assert to i_stream_read()
dovecot at dovecot.org
dovecot at dovecot.org
Fri Nov 27 13:50:56 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/69cb603dec84
changeset: 19431:69cb603dec84
user: Timo Sirainen <tss at iki.fi>
date: Fri Nov 27 15:50:44 2015 +0200
description:
lib: Added extra assert to i_stream_read()
diffstat:
src/lib/istream.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diffs (22 lines):
diff -r feba082aede2 -r 69cb603dec84 src/lib/istream.c
--- a/src/lib/istream.c Fri Nov 27 15:49:58 2015 +0200
+++ b/src/lib/istream.c Fri Nov 27 15:50:44 2015 +0200
@@ -6,6 +6,8 @@
#include "str.h"
#include "istream-private.h"
+static bool i_stream_is_buffer_invalid(const struct istream_private *stream);
+
void i_stream_set_name(struct istream *stream, const char *name)
{
i_free(stream->real_stream->iostream.name);
@@ -184,6 +186,9 @@
}
i_stream_update(_stream);
+ /* verify that parents' access_counters are valid. the parent's
+ i_stream_read() should guarantee this. */
+ i_assert(!i_stream_is_buffer_invalid(_stream));
return ret;
}
More information about the dovecot-cvs
mailing list