]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
submission: Make HELO/EHLO reply submission a separate public function.
authorStephan Bosch <stephan.bosch@dovecot.fi>
Mon, 27 Aug 2018 17:46:21 +0000 (19:46 +0200)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Tue, 9 Oct 2018 06:41:17 +0000 (06:41 +0000)
src/submission/cmd-helo.c
src/submission/submission-commands.h

index 529c5f851e090e3cea36fd3ed5f49c12db550758..eed4a48b3c6b0390d21a0f48bbdfc6ffcdec1c8c 100644 (file)
@@ -38,17 +38,17 @@ static void cmd_helo_update_xclient(struct client *client,
        client->xclient_sent = TRUE;
 }
 
-static void
-cmd_helo_do_reply(struct client *client, struct smtp_server_cmd_ctx *cmd,
-                 struct cmd_helo_context *helo)
+void submission_helo_reply_submit(struct smtp_server_cmd_ctx *cmd,
+                                 struct smtp_server_cmd_helo *data)
 {
+       struct client *client = smtp_server_connection_get_context(cmd->conn);
        enum smtp_capability proxy_caps =
                smtp_client_connection_get_capabilities(client->proxy_conn);
        struct smtp_server_reply *reply;
        uoff_t cap_size;
 
        reply = smtp_server_reply_create_ehlo(cmd->cmd);
-       if (!helo->data->helo.old_smtp) {
+       if (!data->helo.old_smtp) {
                string_t *burl_params = t_str_new(256);
 
                str_append(burl_params, "imap");
@@ -104,7 +104,7 @@ cmd_helo_reply(struct smtp_server_cmd_ctx *cmd, struct cmd_helo_context *helo)
                cmd_helo_update_xclient(client, helo->data);
 
        T_BEGIN {
-               cmd_helo_do_reply(client, cmd, helo);
+               submission_helo_reply_submit(cmd, helo->data);
        } T_END;
 }
 
index d0d5b1d706572efd071392505df16684ef9a2f70..79afe1cce6b433562333bacf49734d6c435519fd 100644 (file)
@@ -4,6 +4,8 @@
 bool client_command_handle_proxy_reply(struct client *client,
        const struct smtp_reply *reply, struct smtp_reply *reply_r);
 
+void submission_helo_reply_submit(struct smtp_server_cmd_ctx *cmd,
+                                 struct smtp_server_cmd_helo *data);
 int cmd_helo(void *conn_ctx, struct smtp_server_cmd_ctx *cmd,
             struct smtp_server_cmd_helo *data);