dovecot-2.2: zlib: Enable only for storages that support MAIL_ST...

dovecot at dovecot.org dovecot at dovecot.org
Thu Jun 13 03:26:34 EEST 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/235be95cb378
changeset: 16502:235be95cb378
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Jun 12 23:01:26 2013 +0300
description:
zlib: Enable only for storages that support MAIL_STORAGE_CLASS_FLAG_BINARY_DATA

diffstat:

 src/plugins/zlib/zlib-plugin.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (22 lines):

diff -r 102d8a59eeda -r 235be95cb378 src/plugins/zlib/zlib-plugin.c
--- 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);
 }
 


More information about the dovecot-cvs mailing list