]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap: COMPRESS - Use create_ostream_auto() API
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Sat, 29 Jul 2023 18:06:41 +0000 (21:06 +0300)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Wed, 12 Feb 2025 10:34:10 +0000 (12:34 +0200)
The compression level can now be configured using the compression settings.

src/imap/cmd-compress.c

index 853687b55995b84f3ae3c4feb0aae1943be8e8a1..cf08c66568f5e42ab042f2c739a4652f6e875a4a 100644 (file)
@@ -49,7 +49,6 @@ bool cmd_compress(struct client_command_context *cmd)
        struct istream *old_input;
        struct ostream *old_output;
        const char *mechanism;
-       int level;
 
        /* <mechanism> */
        if (!client_read_args(cmd, 0, 0, &args))
@@ -136,11 +135,10 @@ bool cmd_compress(struct client_command_context *cmd)
                i_assert(client->input->v_offset == prev_in_offset);
        }
 
-       level = handler->get_default_level();
        old_input = client->input;
        old_output = client->output;
        client->input = handler->create_istream(old_input);
-       client->output = handler->create_ostream(old_output, level);
+       client->output = handler->create_ostream_auto(old_output, cmd->event);
        /* preserve output offset so that the bytes out counter in logout
           message doesn't get reset here */
        client->output->offset = old_output->offset;