From: Stephan Bosch Date: Mon, 31 Aug 2020 12:16:31 +0000 (+0200) Subject: lib-smtp: Reformat smtp-server-cmd-mail.c. X-Git-Tag: 2.3.13~243 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=953c35eed3e11be624ce3a4cf5c544947a131aad;p=thirdparty%2Fdovecot%2Fcore.git lib-smtp: Reformat smtp-server-cmd-mail.c. --- diff --git a/src/lib-smtp/smtp-server-cmd-mail.c b/src/lib-smtp/smtp-server-cmd-mail.c index 872704df3a..b46609c1a0 100644 --- a/src/lib-smtp/smtp-server-cmd-mail.c +++ b/src/lib-smtp/smtp-server-cmd-mail.c @@ -11,8 +11,7 @@ /* 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; @@ -35,13 +34,13 @@ cmd_mail_completed(struct smtp_server_cmd_ctx *cmd, 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); } @@ -51,7 +50,7 @@ cmd_mail_recheck(struct smtp_server_cmd_ctx *cmd, { 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)) @@ -82,7 +81,7 @@ void smtp_server_cmd_mail(struct smtp_server_cmd_ctx *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; @@ -182,18 +181,18 @@ void smtp_server_cmd_mail(struct smtp_server_cmd_ctx *cmd, 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);