dovecot-2.0: imap: Don't reset input/output byte counters when C...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Oct 1 20:34:04 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/766564bb051f
changeset: 12226:766564bb051f
user: Timo Sirainen <tss at iki.fi>
date: Fri Oct 01 18:33:58 2010 +0100
description:
imap: Don't reset input/output byte counters when COMPRESS is started.
diffstat:
src/imap/imap-client.c | 2 +-
src/plugins/imap-zlib/imap-zlib-plugin.c | 3 +++
2 files changed, 4 insertions(+), 1 deletions(-)
diffs (25 lines):
diff -r 0c82fe7ce578 -r 766564bb051f src/imap/imap-client.c
--- 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);
diff -r 0c82fe7ce578 -r 766564bb051f src/plugins/imap-zlib/imap-zlib-plugin.c
--- 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);
More information about the dovecot-cvs
mailing list