]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: Remove obsolete mailbox_save_set_dest_mail()
authorMartti Rannanjärvi <martti.rannanjarvi@dovecot.fi>
Fri, 29 Sep 2017 09:37:58 +0000 (12:37 +0300)
committerAki Tuomi <aki.tuomi@dovecot.fi>
Tue, 3 Oct 2017 06:54:56 +0000 (09:54 +0300)
src/lib-storage/mail-storage-private.h
src/lib-storage/mail-storage.c
src/lib-storage/mail-storage.h

index 5c0293e7ae8d82ec1f2e2db4d511671355c6ee73..9c9e9161c3c06ef9bf7d7f84cb3e0c6f81513dd1 100644 (file)
@@ -686,8 +686,6 @@ struct mail_save_context {
        /* mail is being copied or moved. However, this is set also with
           mailbox_save_using_mail() and then saving==TRUE. */
        bool copying_or_moving:1;
-       /* dest_mail was set via mailbox_save_set_dest_mail() */
-       bool dest_mail_external:1;
 };
 
 struct mailbox_sync_context {
index 3c7db1fc8ee008b20ffafff193ec1ecaf3d6ed17..c6306e578abfccb3bfbf790725824c9c81bed144 100644 (file)
@@ -2183,10 +2183,7 @@ void mailbox_save_context_deinit(struct mail_save_context *ctx)
 {
        i_assert(ctx->dest_mail != NULL);
 
-       if (!ctx->dest_mail_external)
-               mail_free(&ctx->dest_mail);
-       else
-               ctx->dest_mail = NULL;
+       mail_free(&ctx->dest_mail);
 }
 
 void mailbox_save_set_flags(struct mail_save_context *ctx,
@@ -2280,17 +2277,6 @@ void mailbox_save_set_pop3_order(struct mail_save_context *ctx,
        ctx->data.pop3_order = order;
 }
 
-void mailbox_save_set_dest_mail(struct mail_save_context *ctx,
-                               struct mail *mail)
-{
-       i_assert(mail != NULL);
-
-       if (!ctx->dest_mail_external)
-               mail_free(&ctx->dest_mail);
-       ctx->dest_mail = mail;
-       ctx->dest_mail_external = TRUE;
-}
-
 struct mail *mailbox_save_get_dest_mail(struct mail_save_context *ctx)
 {
        return ctx->dest_mail;
index 17510c37395ba37cebd7ef2cb87830c2fbce5fdc..85ad9e6f22947a83f08c7c506154ffae5d455403 100644 (file)
@@ -790,9 +790,6 @@ void mailbox_save_set_pop3_uidl(struct mail_save_context *ctx,
    of the mailbox. Not all backends support this. */
 void mailbox_save_set_pop3_order(struct mail_save_context *ctx,
                                 unsigned int order);
-/* FIXME: Remove in v2.3. Obsolete - use mailbox_save_get_dest_mail() instead */
-void mailbox_save_set_dest_mail(struct mail_save_context *ctx,
-                               struct mail *mail);
 /* Returns the destination mail */
 struct mail *mailbox_save_get_dest_mail(struct mail_save_context *ctx);
 /* Begin saving the message. All mail_save_set_*() calls must have been called