Mercurial > dovecot > core-2.2
changeset 16502:235be95cb378
zlib: Enable only for storages that support MAIL_STORAGE_CLASS_FLAG_BINARY_DATA
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 12 Jun 2013 23:01:26 +0300 |
parents | 102d8a59eeda |
children | 5ed2f41431c4 |
files | src/plugins/zlib/zlib-plugin.c |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/plugins/zlib/zlib-plugin.c Wed Jun 12 22:58:42 2013 +0300 +++ b/src/plugins/zlib/zlib-plugin.c Wed Jun 12 23:01:26 2013 +0300 @@ -349,6 +349,7 @@ { struct mailbox_vfuncs *v = box->vlast; union mailbox_module_context *zbox; + enum mail_storage_class_flags class_flags = box->storage->class_flags; zbox = p_new(box->pool, union mailbox_module_context, 1); zbox->super = *v; @@ -358,8 +359,8 @@ MODULE_CONTEXT_SET_SELF(box, zlib_storage_module, zbox); - if ((box->storage->class_flags & - MAIL_STORAGE_CLASS_FLAG_OPEN_STREAMS) == 0) + if ((class_flags & MAIL_STORAGE_CLASS_FLAG_OPEN_STREAMS) == 0 && + (class_flags & MAIL_STORAGE_CLASS_FLAG_BINARY_DATA) != 0) zlib_permail_alloc_init(box, v); }