Mercurial > dovecot > core-2.2
changeset 12226:766564bb051f
imap: Don't reset input/output byte counters when COMPRESS is started.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 01 Oct 2010 18:33:58 +0100 |
parents | 0c82fe7ce578 |
children | 7c4e4a6b1714 |
files | src/imap/imap-client.c src/plugins/imap-zlib/imap-zlib-plugin.c |
diffstat | 2 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/imap/imap-client.c Fri Oct 01 18:33:19 2010 +0100 +++ b/src/imap/imap-client.c Fri Oct 01 18:33:58 2010 +0100 @@ -145,7 +145,7 @@ tab = t_malloc(sizeof(static_tab)); memcpy(tab, static_tab, sizeof(static_tab)); - tab[0].value = dec2str(client->input->v_offset); + tab[0].value = dec2str(i_stream_get_absolute_offset(client->input)); tab[1].value = dec2str(client->output->offset); str = t_str_new(128);
--- a/src/plugins/imap-zlib/imap-zlib-plugin.c Fri Oct 01 18:33:19 2010 +0100 +++ b/src/plugins/imap-zlib/imap-zlib-plugin.c Fri Oct 01 18:33:58 2010 +0100 @@ -112,6 +112,9 @@ old_output = client->output; client->input = handler->create_istream(old_input, FALSE); client->output = handler->create_ostream(old_output, level); + /* preserve output offset so that the bytes out counter in logout + message doesn't get reset here */ + client->output->offset = old_output->offset; i_stream_unref(&old_input); o_stream_unref(&old_output);