This caused imap-zlib plugin to eat all CPU when stream compression was used.
Patch by Apple.
--HG--
branch : HEAD
static int o_stream_bzlib_flush(struct ostream_private *stream)
{
struct bzlib_ostream *zstream = (struct bzlib_ostream *)stream;
+ int ret;
if (o_stream_bzlib_send_flush(zstream) < 0)
return -1;
- if (o_stream_flush(zstream->output) < 0) {
+ ret = o_stream_flush(zstream->output);
+ if (ret < 0)
zstream_copy_error(zstream);
- return -1;
- }
- return 0;
+ return ret;
}
static ssize_t
static int o_stream_zlib_flush(struct ostream_private *stream)
{
struct zlib_ostream *zstream = (struct zlib_ostream *)stream;
+ int ret;
if (o_stream_zlib_send_flush(zstream) < 0)
return -1;
- if (o_stream_flush(zstream->output) < 0) {
+ ret = o_stream_flush(zstream->output);
+ if (ret < 0)
zstream_copy_error(zstream);
- return -1;
- }
- return 0;
+ return ret;
}
static ssize_t