From: Martti Rannanjärvi Date: Fri, 29 Sep 2017 09:37:58 +0000 (+0300) Subject: lib-storage: Remove obsolete mailbox_save_set_dest_mail() X-Git-Tag: 2.3.0.rc1~950 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a19ae4b399557c0bba809bbf32221a4b8957e86;p=thirdparty%2Fdovecot%2Fcore.git lib-storage: Remove obsolete mailbox_save_set_dest_mail() --- diff --git a/src/lib-storage/mail-storage-private.h b/src/lib-storage/mail-storage-private.h index 5c0293e7ae..9c9e9161c3 100644 --- a/src/lib-storage/mail-storage-private.h +++ b/src/lib-storage/mail-storage-private.h @@ -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 { diff --git a/src/lib-storage/mail-storage.c b/src/lib-storage/mail-storage.c index 3c7db1fc8e..c6306e578a 100644 --- a/src/lib-storage/mail-storage.c +++ b/src/lib-storage/mail-storage.c @@ -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; diff --git a/src/lib-storage/mail-storage.h b/src/lib-storage/mail-storage.h index 17510c3739..85ad9e6f22 100644 --- a/src/lib-storage/mail-storage.h +++ b/src/lib-storage/mail-storage.h @@ -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