]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
submission: Split the NOOP command into a generic part and a part related to relaying...
authorStephan Bosch <stephan.bosch@dovecot.fi>
Wed, 29 Aug 2018 21:43:43 +0000 (23:43 +0200)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Tue, 12 Feb 2019 13:40:40 +0000 (15:40 +0200)
src/submission/cmd-noop.c
src/submission/submission-commands.h

index b3e35c12e8b41878b7e1e0f51d44b28eef18d12f..6cd7da50bb5f981ec44bcc693f5c3509245ad925 100644 (file)
@@ -33,9 +33,8 @@ static void cmd_noop_proxy_cb(const struct smtp_reply *proxy_reply,
        }
 }
 
-int cmd_noop(void *conn_ctx, struct smtp_server_cmd_ctx *cmd)
+int cmd_noop_relay(struct client *client, struct smtp_server_cmd_ctx *cmd)
 {
-       struct client *client = conn_ctx;
        struct cmd_noop_context *noop_cmd;
 
        noop_cmd = p_new(cmd->pool, struct cmd_noop_context, 1);
@@ -46,3 +45,10 @@ int cmd_noop(void *conn_ctx, struct smtp_server_cmd_ctx *cmd)
                (client->proxy_conn, 0, cmd_noop_proxy_cb, noop_cmd);
        return 0;
 }
+
+int cmd_noop(void *conn_ctx, struct smtp_server_cmd_ctx *cmd)
+{
+       struct client *client = conn_ctx;
+
+       return cmd_noop_relay(client, cmd);
+}
index 640198b21ca4300ee604ee108962dd5e2a9fa299..c5b0cc15847760d074dacb382e4e95339dddb339 100644 (file)
@@ -16,6 +16,7 @@ int cmd_data_relay(struct client *client, struct smtp_server_cmd_ctx *cmd,
                   struct istream *data_input);
 int cmd_vrfy_relay(struct client *client, struct smtp_server_cmd_ctx *cmd,
                   const char *param);
+int cmd_noop_relay(struct client *client, struct smtp_server_cmd_ctx *cmd);
 
 void submission_helo_reply_submit(struct smtp_server_cmd_ctx *cmd,
                                  struct smtp_server_cmd_helo *data);