Skip to content

Commit

Permalink
lib-smtp: server: DATA command: Restore input handling upon failure.
Browse files Browse the repository at this point in the history
Fixes command hanging upon failure during data transfer.
  • Loading branch information
stephanbosch authored and villesavolainen committed May 28, 2018
1 parent 0d48dd6 commit 94d9997
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib-smtp/smtp-server-cmd-data.c
Expand Up @@ -119,7 +119,11 @@ static void cmd_data_destroy(struct smtp_server_cmd_ctx *cmd)

static void cmd_data_replied(struct smtp_server_cmd_ctx *cmd)
{
struct smtp_server_command *command = cmd->cmd;

smtp_server_command_input_lock(cmd);
if (!smtp_server_command_replied_success(command))
smtp_server_command_input_unlock(cmd);
}

static void cmd_data_completed(struct smtp_server_cmd_ctx *cmd)
Expand Down

0 comments on commit 94d9997

Please sign in to comment.