]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Removed unnecessary struct mail_save_context.saved_physical_size
authorTimo Sirainen <tss@iki.fi>
Wed, 26 May 2010 15:16:44 +0000 (16:16 +0100)
committerTimo Sirainen <tss@iki.fi>
Wed, 26 May 2010 15:16:44 +0000 (16:16 +0100)
--HG--
branch : HEAD

src/lib-storage/mail-storage-private.h
src/plugins/zlib/zlib-plugin.c

index cafc79857aa46161ec5b6f16d989bdda7da5ce55..27fbdafa65e43270eb2698d84e8b1c080030925f 100644 (file)
@@ -418,11 +418,6 @@ struct mail_save_context {
        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;
 };
index 2d3a3e5c74170b0d65773574eabb2d3bf46bfb04..c7924a65683feefd9f627c7ee0def4b98b07afb9 100644 (file)
@@ -292,17 +292,6 @@ zlib_mail_save_compress_begin(struct mail_save_context *ctx,
        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 @@ static void zlib_permail_alloc_init(struct mailbox *box)
                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;
        }
 }