Skip to content

Commit

Permalink
submission: Make HELO/EHLO reply submission a separate public function.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanbosch authored and cmouse committed Oct 9, 2018
1 parent 20739fc commit 0c66087
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/submission/cmd-helo.c
Expand Up @@ -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");
Expand Down Expand Up @@ -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;
}

Expand Down
2 changes: 2 additions & 0 deletions src/submission/submission-commands.h
Expand Up @@ -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);

Expand Down

0 comments on commit 0c66087

Please sign in to comment.