dovecot-2.2: lib: Fixed assert-crash in o_stream_send_istream() ...
dovecot at dovecot.org
dovecot at dovecot.org
Thu Oct 9 15:41:41 UTC 2014
details: http://hg.dovecot.org/dovecot-2.2/rev/c36cfd735d60
changeset: 17929:c36cfd735d60
user: Timo Sirainen <tss at iki.fi>
date: Thu Oct 09 18:40:54 2014 +0300
description:
lib: Fixed assert-crash in o_stream_send_istream() if input stream was the one that failed.
diffstat:
src/lib/ostream.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (19 lines):
diff -r 193c82411d73 -r c36cfd735d60 src/lib/ostream.c
--- a/src/lib/ostream.c Thu Oct 09 18:27:14 2014 +0300
+++ b/src/lib/ostream.c Thu Oct 09 18:40:54 2014 +0300
@@ -329,9 +329,12 @@
o_stream_clear_error(outstream);
ret = _outstream->send_istream(_outstream, instream);
if (unlikely(ret < 0)) {
- i_assert(outstream->stream_errno != 0);
- outstream->last_failed_errno = outstream->stream_errno;
- errno = outstream->stream_errno;
+ if (outstream->stream_errno != 0) {
+ outstream->last_failed_errno = outstream->stream_errno;
+ errno = outstream->stream_errno;
+ } else {
+ i_assert(instream->stream_errno != 0);
+ }
}
return ret;
}
More information about the dovecot-cvs
mailing list