X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=citadel%2Fmodules%2Fsmtp%2Fsmtp_clienthandlers.c;fp=citadel%2Fmodules%2Fsmtp%2Fsmtp_clienthandlers.c;h=b3de3ae1ee0acac10af62d859bc44d98f17ca795;hp=e7ccae385bf33a4acef572684847d623b9eec916;hb=0d7d457ca13abbbc077633edd900cf20f6552dda;hpb=2e23d932ea71382aac3644619df7c6b69287aea5 diff --git a/citadel/modules/smtp/smtp_clienthandlers.c b/citadel/modules/smtp/smtp_clienthandlers.c index e7ccae385..b3de3ae1e 100644 --- a/citadel/modules/smtp/smtp_clienthandlers.c +++ b/citadel/modules/smtp/smtp_clienthandlers.c @@ -122,6 +122,7 @@ eNextState SMTPC_read_greeting(SmtpOutMsg *Msg) /* Process the SMTP greeting from the server */ AsyncIO *IO = &Msg->IO; SMTP_DBG_READ(); + SetSMTPState(IO, eSTMPsmtp); if (!SMTP_IS_STATE('2')) { if (SMTP_IS_STATE('4')) @@ -304,11 +305,13 @@ eNextState SMTPC_read_DATAcmd_reply(SmtpOutMsg *Msg) SMTP_DBG_READ(); if (!SMTP_IS_STATE('3')) { + SetSMTPState(IO, eSTMPfailOne); if (SMTP_IS_STATE('4')) SMTP_VERROR(3); else SMTP_VERROR(5); } + SetSMTPState(IO, eSTMPsmtpdata); return eSendReply; } @@ -352,6 +355,7 @@ eNextState SMTPC_read_data_body_reply(SmtpOutMsg *Msg) SMTP_VERROR(5); } + SetSMTPState(IO, eSTMPsmtpdone); /* We did it! */ StrBufPlain(Msg->MyQEntry->StatusMessage, &ChrPtr(Msg->IO.RecvBuf.Buf)[4],