]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-smtp: smtp-server - Drop smtp_server_reply_early()
authorStephan Bosch <stephan.bosch@open-xchange.com>
Wed, 27 Aug 2025 17:42:15 +0000 (19:42 +0200)
committerStephan Bosch <stephan.bosch@open-xchange.com>
Fri, 26 Sep 2025 01:42:21 +0000 (03:42 +0200)
Pipeline handling revised in previous commit makes this functionality
superfluous.

src/lib-smtp/smtp-server-private.h
src/lib-smtp/smtp-server-reply.c
src/lib-smtp/smtp-server.h
src/lib-smtp/test-smtp-server-errors.c

index e8cae543c392c478c4a19b0e590357740a93b92f..47b2362694a249691a164e0935ebbb3e6e644a17 100644 (file)
@@ -106,7 +106,6 @@ struct smtp_server_command {
        bool input_locked:1;
        bool input_captured:1;
        bool pipeline_blocked:1;
-       bool reply_early:1;
        bool destroying:1;
 };
 
@@ -274,7 +273,7 @@ smtp_server_command_is_complete(struct smtp_server_command *cmd)
 {
        struct smtp_server_connection *conn = cmd->context.conn;
 
-       return (conn->input_broken || (cmd->next != NULL) || cmd->reply_early ||
+       return (conn->input_broken || (cmd->next != NULL) ||
                !smtp_server_connection_pending_command_data(conn));
 }
 
index f01f51bb851afeb888cf1889366caec4ada9b64e..6edf60eb1982ac41a17b173222b47161600930cd 100644 (file)
@@ -533,19 +533,6 @@ void smtp_server_reply_all(struct smtp_server_cmd_ctx *_cmd,
        va_end(args);
 }
 
-void smtp_server_reply_early(struct smtp_server_cmd_ctx *_cmd,
-                            unsigned int status, const char *enh_code,
-                            const char *fmt, ...)
-{
-       va_list args;
-
-       _cmd->cmd->reply_early = TRUE;
-
-       va_start(args, fmt);
-       smtp_server_reply_allv(_cmd, status, enh_code, fmt, args);
-       va_end(args);
-}
-
 void smtp_server_reply_quit(struct smtp_server_cmd_ctx *_cmd)
 {
        struct smtp_server_command *cmd = _cmd->cmd;
index 2ee7b6af776098b1478663a30305d1aacfde376c..8e13dd719ac1f8b73ca1678fa8fe7f9053484f9d 100644 (file)
@@ -774,11 +774,6 @@ void smtp_server_reply_forward(struct smtp_server_cmd_ctx *cmd,
 void smtp_server_reply_all(struct smtp_server_cmd_ctx *_cmd,
                           unsigned int status, const char *enh_code,
                           const char *fmt, ...) ATTR_FORMAT(4, 5);
-/* Submit and send the same message for all expected replies for this command
-   early; i.e., no matter whether all command data is received completely. */
-void smtp_server_reply_early(struct smtp_server_cmd_ctx *_cmd,
-                            unsigned int status, const char *enh_code,
-                            const char *fmt, ...) ATTR_FORMAT(4, 5);
 
 /* Reply the command with a 221 bye message */
 void smtp_server_reply_quit(struct smtp_server_cmd_ctx *_cmd);
index c087d4b2b2e906fc613dc078a17999adeeae7a93..999a44da1e7cf45e2e91c6c8e559df7553ae80de 100644 (file)
@@ -1291,8 +1291,8 @@ test_server_big_data_data_continue(void *conn_ctx ATTR_UNUSED,
        }
 
        if (ctx->payload_input->v_offset >= max_size) {
-               smtp_server_reply_early(cmd, 552, "5.3.4",
-                                       "Message too big for system");
+               smtp_server_reply(cmd, 552, "5.3.4",
+                                 "Message too big for system");
                return -1;
        }