dovecot-2.0: lib-storage: Removed unnecessary struct mail_save_c...

dovecot at dovecot.org dovecot at dovecot.org
Wed May 26 18:16:49 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/4eaebea097db
changeset: 11378:4eaebea097db
user:      Timo Sirainen <tss at iki.fi>
date:      Wed May 26 16:16:44 2010 +0100
description:
lib-storage: Removed unnecessary struct mail_save_context.saved_physical_size

diffstat:

 src/lib-storage/mail-storage-private.h |   5 -----
 src/plugins/zlib/zlib-plugin.c         |  12 ------------
 2 files changed, 0 insertions(+), 17 deletions(-)

diffs (44 lines):

diff -r 2fa46ba7ff2f -r 4eaebea097db src/lib-storage/mail-storage-private.h
--- a/src/lib-storage/mail-storage-private.h	Wed May 26 16:16:14 2010 +0100
+++ b/src/lib-storage/mail-storage-private.h	Wed May 26 16:16:44 2010 +0100
@@ -418,11 +418,6 @@
 	char *guid, *pop3_uidl, *from_envelope;
 	struct ostream *output;
 
-	/* if non-zero, overrides the physical size that should be saved.
-	   for example when using zlib plugin, this would contain the mail's
-	   uncompressed size. */
-	uoff_t saved_physical_size;
-
 	/* we came here from mailbox_copy() */
 	unsigned int copying:1;
 };
diff -r 2fa46ba7ff2f -r 4eaebea097db src/plugins/zlib/zlib-plugin.c
--- a/src/plugins/zlib/zlib-plugin.c	Wed May 26 16:16:14 2010 +0100
+++ b/src/plugins/zlib/zlib-plugin.c	Wed May 26 16:16:44 2010 +0100
@@ -292,17 +292,6 @@
 	return 0;
 }
 
-static int zlib_mail_save_compress_finish(struct mail_save_context *ctx)
-{
-	struct mailbox *box = ctx->transaction->box;
-	union mailbox_module_context *zbox = ZLIB_CONTEXT(box);
-
-	/* a bit kludgy: zlib ostreams' offset is actually the
-	   uncompressed offset */
-	ctx->saved_physical_size = ctx->output->offset;
-	return zbox->super.save_finish(ctx);
-}
-
 static void zlib_permail_alloc_init(struct mailbox *box)
 {
 	struct zlib_user *zuser = ZLIB_USER_CONTEXT(box->storage->user);
@@ -316,7 +305,6 @@
 		box->v.save_finish = zlib_mail_save_finish;
 	} else {
 		box->v.save_begin = zlib_mail_save_compress_begin;
-		box->v.save_finish = zlib_mail_save_compress_finish;
 	}
 }
 


More information about the dovecot-cvs mailing list