# HG changeset patch # User Timo Sirainen # Date 1482515784 18000 # Node ID d1788e9bd7ea7303a73eac1ec6541db574b7feea # Parent bc16d43aed49b51a2a39012c06702c6751d38ca2 lib-mail: istream-attachment-extractor - remove unnecessary code It's enough to set the stream_errno. diff -r bc16d43aed49 -r d1788e9bd7ea src/lib-mail/istream-attachment-extractor.c --- a/src/lib-mail/istream-attachment-extractor.c Tue Nov 01 18:35:48 2016 +0200 +++ b/src/lib-mail/istream-attachment-extractor.c Fri Dec 23 12:56:24 2016 -0500 @@ -59,7 +59,6 @@ struct attachment_istream_part part; bool retry_read; - bool failed; }; static void stream_add_data(struct attachment_istream *astream, @@ -599,11 +598,6 @@ if (stream->pos - stream->skip >= i_stream_get_max_buffer_size(&stream->istream)) return -2; - if (astream->failed) { - stream->istream.stream_errno = EINVAL; - return -1; - } - old_size = stream->pos - stream->skip; switch (message_parser_parse_next_block(astream->parser, &block)) { case -1: @@ -620,7 +614,6 @@ if (ret < 0) { io_stream_set_error(&stream->iostream, "%s", error); stream->istream.stream_errno = EINVAL; - astream->failed = TRUE; } astream->cur_part = NULL; return -1; @@ -636,7 +629,6 @@ if (astream_end_of_part(astream, &error) < 0) { io_stream_set_error(&stream->iostream, "%s", error); stream->istream.stream_errno = EINVAL; - astream->failed = TRUE; return -1; } }