]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-smtp: smtp-server-recipient - Remove smtp_server_recipient_initialize().
authorStephan Bosch <stephan.bosch@open-xchange.com>
Mon, 9 Nov 2020 11:29:16 +0000 (12:29 +0100)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Mon, 24 May 2021 11:59:03 +0000 (11:59 +0000)
It is no longer needed.

src/lib-smtp/smtp-server-cmd-rcpt.c
src/lib-smtp/smtp-server-private.h
src/lib-smtp/smtp-server-recipient.c

index 9352d2c5f8bb48a0467e45551a65f3c4e4fba01d..1a4a0014dd4c759c0564d9346bd4dda10007f42b 100644 (file)
@@ -14,8 +14,6 @@
 
 struct smtp_server_cmd_rcpt {
        struct smtp_server_recipient *rcpt;
-
-       bool initialized:1;
 };
 
 static void
@@ -66,7 +64,6 @@ cmd_rcpt_completed(struct smtp_server_cmd_ctx *cmd,
        i_assert(smtp_server_command_is_replied(command));
        i_assert(conn->state.state == SMTP_SERVER_STATE_RCPT_TO ||
                 !smtp_server_command_replied_success(command));
-       i_assert(data->initialized);
 
        if (!smtp_server_command_replied_success(command)) {
                /* Failure */
@@ -86,15 +83,9 @@ cmd_rcpt_recheck(struct smtp_server_cmd_ctx *cmd,
                 struct smtp_server_cmd_rcpt *data ATTR_UNUSED)
 {
        struct smtp_server_connection *conn = cmd->conn;
-       struct smtp_server_recipient *rcpt = data->rcpt;
 
        i_assert(conn->state.pending_mail_cmds == 0);
 
-       if (!data->initialized) {
-               smtp_server_recipient_initialize(rcpt);
-               data->initialized = TRUE;
-       }
-
        /* All preceeding commands have finished and now the transaction state
           is clear. This provides the opportunity to re-check the transaction
           state and abort the pending proxied mail command if it is bound to
@@ -215,11 +206,6 @@ void smtp_server_cmd_rcpt(struct smtp_server_cmd_ctx *cmd,
        smtp_server_command_add_hook(command, SMTP_SERVER_COMMAND_HOOK_DESTROY,
                                     cmd_rcpt_destroy, rcpt_data);
 
-       if (conn->state.trans != NULL) {
-               smtp_server_recipient_initialize(rcpt);
-               rcpt_data->initialized = TRUE;
-       }
-
        conn->state.pending_rcpt_cmds++;
 
        smtp_server_command_ref(command);
index 5028866f451ccffcac0f13d7d8ae8e661fa98cdc..4aa774792b33c1d72e746cb4a5c40ffff995df66 100644 (file)
@@ -367,8 +367,6 @@ void smtp_server_recipient_ref(struct smtp_server_recipient *rcpt);
 bool smtp_server_recipient_unref(struct smtp_server_recipient **_rcpt);
 void smtp_server_recipient_destroy(struct smtp_server_recipient **_rcpt);
 
-void smtp_server_recipient_initialize(struct smtp_server_recipient *rcpt);
-
 bool smtp_server_recipient_approved(struct smtp_server_recipient **_rcpt);
 void smtp_server_recipient_denied(struct smtp_server_recipient *rcpt,
                                  const struct smtp_server_reply *reply);
index 536f3d2c9cfd80f50fe9b8f188b6c9bdd727f3c9..fbae663401ced0d8dc11b15ae3756abefce337bb 100644 (file)
@@ -126,14 +126,6 @@ void smtp_server_recipient_destroy(struct smtp_server_recipient **_rcpt)
        smtp_server_recipient_unref(_rcpt);
 }
 
-void smtp_server_recipient_initialize(struct smtp_server_recipient *rcpt)
-{
-       struct smtp_server_recipient_private *prcpt =
-               (struct smtp_server_recipient_private *)rcpt;
-
-       smtp_server_recipient_create_event(prcpt);
-}
-
 const struct smtp_address *
 smtp_server_recipient_get_original(struct smtp_server_recipient *rcpt)
 {