]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-smtp: Reformat smtp-server-cmd-mail.c.
authorStephan Bosch <stephan.bosch@open-xchange.com>
Mon, 31 Aug 2020 12:16:31 +0000 (14:16 +0200)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Thu, 10 Sep 2020 12:43:56 +0000 (12:43 +0000)
src/lib-smtp/smtp-server-cmd-mail.c

index 872704df3ac890255f9e9876b97f064009bf1db0..b46609c1a0ade5af69520d4b329800698e126344 100644 (file)
@@ -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);