Skip to content

Commit

Permalink
lib-smtp: server: NOOP command: Implement smtp_server_cmd_noop_reply_…
Browse files Browse the repository at this point in the history
…success() for sending default success reply.
  • Loading branch information
stephanbosch committed Oct 29, 2018
1 parent 9eb0245 commit ca137b1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/lib-smtp/smtp-server-cmd-noop.c
Expand Up @@ -35,6 +35,13 @@ void smtp_server_cmd_noop(struct smtp_server_cmd_ctx *cmd,
}
}
if (!smtp_server_command_is_replied(command))
smtp_server_reply(cmd, 250, "2.0.0", "OK");
smtp_server_cmd_noop_reply_success(cmd);
smtp_server_command_unref(&command);
}

void smtp_server_cmd_noop_reply_success(struct smtp_server_cmd_ctx *cmd)
{
i_assert(cmd->cmd->reg->func == smtp_server_cmd_noop);

smtp_server_reply(cmd, 250, "2.0.0", "OK");
}
4 changes: 4 additions & 0 deletions src/lib-smtp/smtp-server.h
Expand Up @@ -559,6 +559,10 @@ bool smtp_server_cmd_data_check_size(struct smtp_server_cmd_ctx *cmd);

void smtp_server_cmd_vrfy_reply_default(struct smtp_server_cmd_ctx *cmd);

/* NOOP */

void smtp_server_cmd_noop_reply_success(struct smtp_server_cmd_ctx *cmd);

/*
* Reply
*/
Expand Down

0 comments on commit ca137b1

Please sign in to comment.