Skip to content

Commit

Permalink
lib-smtp: smtp-client-command - Emit smtp_client_command_finished eve…
Browse files Browse the repository at this point in the history
…nt for replied commands.

This was an omission.
  • Loading branch information
stephanbosch authored and sirainen committed Mar 5, 2019
1 parent 0343a55 commit 404b508
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/lib-smtp/smtp-client-command.c
Expand Up @@ -939,7 +939,15 @@ smtp_client_command_input_reply(struct smtp_client_command *cmd,
i_assert(cmd->replies_seen < cmd->replies_expected);
finished = (++cmd->replies_seen == cmd->replies_expected);

e_debug(cmd->event, "Got reply (%u/%u): %s "
/* Finish command event at final reply or first failure */
struct event_passthrough *e = event_create_passthrough(cmd->event);
if (!cmd->event_finished &&
(finished || !smtp_reply_is_success(reply))) {
e->set_name("smtp_client_command_finished");
smtp_reply_add_to_event(reply, e);
cmd->event_finished = TRUE;
}
e_debug(e->event(), "Got reply (%u/%u): %s "
"(%u commands pending, %u commands queued)",
cmd->replies_seen, cmd->replies_expected,
smtp_reply_log(reply), conn->cmd_wait_list_count,
Expand Down

0 comments on commit 404b508

Please sign in to comment.