Mercurial > dovecot > original-hg > dovecot-1.2
diff src/imap/cmd-append.c @ 2878:904c31d74acc HEAD
APPEND was using all CPU.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 12 Nov 2004 00:10:56 +0200 |
parents | b63b4080c6b2 |
children | 61c8d205d887 |
line wrap: on
line diff
--- a/src/imap/cmd-append.c Fri Nov 12 00:01:39 2004 +0200 +++ b/src/imap/cmd-append.c Fri Nov 12 00:10:56 2004 +0200 @@ -59,6 +59,8 @@ /* command execution was finished */ client->bad_counter = 0; _client_reset_command(client); + o_stream_set_flush_callback(client->output, + _client_output, client); if (client->input_pending) _client_input(client); @@ -385,6 +387,10 @@ io_remove(client->io); client->io = io_add(i_stream_get_fd(client->input), IO_READ, client_input, client); + /* append is special because we're only waiting on client input, not + client output, so disable the standard output handler until we're + finished */ + o_stream_set_flush_callback(client->output, NULL, NULL); ctx->save_parser = imap_parser_create(client->input, client->output, imap_max_line_length);