From: Timo Sirainen Date: Wed, 27 Nov 2024 14:09:35 +0000 (+0200) Subject: fs-compress: Remove support for legacy compress ostream_init() API X-Git-Tag: 2.4.0~87 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ae232a95a7dd178a87cb26ba8ed8966602b19716;p=thirdparty%2Fdovecot%2Fcore.git fs-compress: Remove support for legacy compress ostream_init() API --- diff --git a/src/plugins/fs-compress/fs-compress.c b/src/plugins/fs-compress/fs-compress.c index 184b25d7b1..50cb6af521 100644 --- a/src/plugins/fs-compress/fs-compress.c +++ b/src/plugins/fs-compress/fs-compress.c @@ -12,12 +12,10 @@ #include "fs-api-private.h" #define FS_COMPRESS_ISTREAM_MIN_BUFFER_SIZE 1024 -#define COMPRESS_LEVEL_USE_AUTO INT_MIN struct compress_fs { struct fs fs; const struct compression_handler *compress_handler; - int compress_level; /* COMPRESS_LEVEL_USE_AUTO = use create_ostream_auto() */ bool try_plain; }; @@ -100,7 +98,6 @@ fs_compress_init(struct fs *_fs, const struct fs_parameters *params, return -1; } settings_free(set); - fs->compress_level = COMPRESS_LEVEL_USE_AUTO; return fs_init_parent(_fs, params, error_r); } @@ -218,13 +215,8 @@ static void fs_compress_write_stream(struct fs_file *_file) iostream_temp_create_named(_file->fs->temp_path_prefix, IOSTREAM_TEMP_FLAG_TRY_FD_DUP, fs_file_path(_file)); - if (file->fs->compress_level == COMPRESS_LEVEL_USE_AUTO) { - _file->output = file->fs->compress_handler-> - create_ostream_auto(file->temp_output, _file->event); - } else { - _file->output = file->fs->compress_handler-> - create_ostream(file->temp_output, file->fs->compress_level); - } + _file->output = file->fs->compress_handler-> + create_ostream_auto(file->temp_output, _file->event); } static int fs_compress_write_stream_finish(struct fs_file *_file, bool success)