From: Stephan Bosch Date: Sat, 1 Sep 2018 11:34:53 +0000 (+0200) Subject: submission: Move generic part of HELO/EHLO command to submission-commands.c. X-Git-Tag: 2.3.9~1344 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=603f5bef73721dc7ed803bc1ad5df6a6da1462c9;p=thirdparty%2Fdovecot%2Fcore.git submission: Move generic part of HELO/EHLO command to submission-commands.c. --- diff --git a/src/submission/cmd-helo.c b/src/submission/cmd-helo.c index 46d00e51c9..26a8ce9f25 100644 --- a/src/submission/cmd-helo.c +++ b/src/submission/cmd-helo.c @@ -106,18 +106,3 @@ int cmd_helo_relay(struct client *client, struct smtp_server_cmd_ctx *cmd, return 0; } -int cmd_helo(void *conn_ctx, struct smtp_server_cmd_ctx *cmd, - struct smtp_server_cmd_helo *data) -{ - struct client *client = conn_ctx; - - if (!data->first || - smtp_server_connection_get_state(client->conn) - >= SMTP_SERVER_STATE_READY) - return cmd_helo_relay(client, cmd, data); - - /* respond right away */ - submission_helo_reply_submit(cmd, data); - return 1; -} - diff --git a/src/submission/submission-commands.c b/src/submission/submission-commands.c index 7a3531cb19..1e021da5ea 100644 --- a/src/submission/submission-commands.c +++ b/src/submission/submission-commands.c @@ -67,3 +67,22 @@ void submission_helo_reply_submit(struct smtp_server_cmd_ctx *cmd, smtp_server_reply_submit(reply); } +/* + * EHLO, HELO commands + */ + +int cmd_helo(void *conn_ctx, struct smtp_server_cmd_ctx *cmd, + struct smtp_server_cmd_helo *data) +{ + struct client *client = conn_ctx; + + if (!data->first || + smtp_server_connection_get_state(client->conn) + >= SMTP_SERVER_STATE_READY) + return cmd_helo_relay(client, cmd, data); + + /* respond right away */ + submission_helo_reply_submit(cmd, data); + return 1; +} +