Skip to content

Commit

Permalink
lib-smtp: client: Add debug message for the moment when all RCPT repl…
Browse files Browse the repository at this point in the history
…ies are received.

This helps in debugging transaction state transition problems.
  • Loading branch information
stephanbosch authored and sirainen committed Aug 22, 2018
1 parent 2b56106 commit 0391f9b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib-smtp/smtp-client-transaction.c
Expand Up @@ -550,6 +550,8 @@ smtp_client_transaction_rcpt_cb(const struct smtp_reply *reply,
rcpt_callback(reply, context);

if (trans->data_provided && array_count(&trans->rcpts_pending) == 0) {
smtp_client_transaction_debug(trans, "Got all RCPT replies");

trans->state = SMTP_CLIENT_TRANSACTION_STATE_DATA;

if (array_count(&trans->rcpts) == 0) {
Expand Down Expand Up @@ -747,6 +749,9 @@ void smtp_client_transaction_send(
{
i_assert(trans->state < SMTP_CLIENT_TRANSACTION_STATE_FINISHED);

if (array_count(&trans->rcpts_pending) == 0)
smtp_client_transaction_debug(trans, "Got all RCPT replies");

smtp_client_transaction_debug(trans, "Send");

trans->data_provided = TRUE;
Expand Down

0 comments on commit 0391f9b

Please sign in to comment.