/* MAIL command */
-static bool
-cmd_mail_check_state(struct smtp_server_cmd_ctx *cmd)
+static bool cmd_mail_check_state(struct smtp_server_cmd_ctx *cmd)
{
struct smtp_server_connection *conn = cmd->conn;
i_assert(smtp_server_command_is_replied(command));
if (!smtp_server_command_replied_success(command)) {
- /* failure; substitute our own error if predictable */
+ /* Failure; substitute our own error if predictable */
if (smtp_server_command_reply_is_forwarded(command))
(void)cmd_mail_check_state(cmd);
return;
}
- /* success */
+ /* Success */
conn->state.trans = smtp_server_transaction_create(conn, data);
}
{
struct smtp_server_connection *conn = cmd->conn;
- /* all preceeding commands have finished and now the transaction state
+ /* All preceeding commands have finished and now the transaction state
is clear. This provides the opportunity to re-check the transaction
state */
if (!cmd_mail_check_state(cmd))
Reverse-path = Path / "<>"
*/
- /* check transaction state as far as possible */
+ /* Check transaction state as far as possible */
if (!cmd_mail_check_state(cmd))
return;
smtp_server_command_ref(command);
if (callbacks != NULL && callbacks->conn_cmd_mail != NULL) {
- /* specific implementation of MAIL command */
- if ((ret=callbacks->conn_cmd_mail(conn->context,
- cmd, mail_data)) <= 0) {
+ /* Specific implementation of MAIL command */
+ ret = callbacks->conn_cmd_mail(conn->context, cmd, mail_data);
+ if (ret <= 0) {
i_assert(ret == 0 ||
smtp_server_command_is_replied(command));
- /* command is waiting for external event or it failed */
+ /* Command is waiting for external event or it failed */
smtp_server_command_unref(&command);
return;
}
}
if (!smtp_server_command_is_replied(command)) {
- /* set generic MAIL success reply if none is provided */
+ /* Set generic MAIL success reply if none is provided */
smtp_server_cmd_mail_reply_success(cmd);
}
smtp_server_command_unref(&command);