Mercurial > dovecot > original-hg > dovecot-1.2
diff src/pop3/commands.c @ 2712:c710572d7075 HEAD
Buffer more in memory before sending RETR replies.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 09 Oct 2004 00:21:11 +0300 |
parents | d2e899bb6f5b |
children | f8adc5cb2508 |
line wrap: on
line diff
--- a/src/pop3/commands.c Fri Oct 08 23:25:00 2004 +0300 +++ b/src/pop3/commands.c Sat Oct 09 00:21:11 2004 +0300 @@ -227,8 +227,7 @@ const unsigned char *data; unsigned char add; size_t i, size; - - o_stream_uncork(client->output); + int ret; while ((ctx->body_lines > 0 || !ctx->in_body) && i_stream_read_data(ctx->stream, &data, &size, 0) > 0) { @@ -281,12 +280,13 @@ i_stream_skip(ctx->stream, i); } - if (o_stream_get_buffer_used_size(client->output) > 0) { - if (client->output->closed) + if (o_stream_get_buffer_used_size(client->output) >= 4096) { + if ((ret = o_stream_flush(client->output)) < 0) break; - - /* continue later */ - return; + if (ret == 0) { + /* continue later */ + return; + } } if (add != '\0') {