]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lmtp: local: Do not use array_idx() to obtain transaction recipient from lib-smtp.
authorStephan Bosch <stephan.bosch@dovecot.fi>
Mon, 12 Mar 2018 02:12:44 +0000 (03:12 +0100)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Tue, 12 Feb 2019 13:40:58 +0000 (15:40 +0200)
It is already available in struct lmtp_recipient. Also, this call was very ugly.

src/lmtp/lmtp-local.c

index 37bf42e5adfc574ddc3e403eef32af342fc0f249..22dec11f6302da0852cee3bf564f8a601893ac8d 100644 (file)
@@ -468,10 +468,9 @@ lmtp_local_deliver(struct lmtp_local *local,
                   struct mail_deliver_session *session)
 {
        struct client *client = local->client;
-       struct smtp_address *rcpt_to = rcpt->rcpt.rcpt->path;
+       struct smtp_server_recipient *trcpt = rcpt->rcpt.rcpt;
+       struct smtp_address *rcpt_to = trcpt->path;
        unsigned int rcpt_idx = rcpt->rcpt.index;
-       const struct smtp_server_recipient *trcpt =
-               *array_idx(&trans->rcpt_to, rcpt_idx);
        struct mail_storage_service_user *service_user = rcpt->service_user;
        struct mail_deliver_context dctx;
        struct mail_user *rcpt_user;