diff options
Diffstat (limited to 'contrib/sendmail/src/usersmtp.c')
-rw-r--r-- | contrib/sendmail/src/usersmtp.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/contrib/sendmail/src/usersmtp.c b/contrib/sendmail/src/usersmtp.c index 0bcbcf5..24b0954 100644 --- a/contrib/sendmail/src/usersmtp.c +++ b/contrib/sendmail/src/usersmtp.c @@ -89,6 +89,7 @@ smtpinit(m, mci, e, onlyhelo) */ SmtpError[0] = '\0'; + SmtpMsgBuffer[0] = '\0'; CurHostName = mci->mci_host; /* XXX UGLY XXX */ if (CurHostName == NULL) CurHostName = MyHostName; @@ -2899,7 +2900,10 @@ smtpquit(m, mci, e) char *oldcurhost; if (mci->mci_state == MCIS_CLOSED) + { + mci_close(mci, "smtpquit:1"); return; + } oldcurhost = CurHostName; CurHostName = mci->mci_host; /* XXX UGLY XXX */ @@ -3133,7 +3137,7 @@ reply(m, mci, e, timeout, pfunc, enhstat, rtype) if (strncmp(SmtpMsgBuffer, "QUIT", 4) == 0) { errno = mci->mci_errno; - mci->mci_state = MCIS_CLOSED; + mci_close(mci, "reply:1"); return -1; } mci->mci_state = MCIS_ERROR; @@ -3158,7 +3162,7 @@ reply(m, mci, e, timeout, pfunc, enhstat, rtype) /* errors on QUIT should be ignored */ if (strncmp(SmtpMsgBuffer, "QUIT", 4) == 0) { - mci->mci_state = MCIS_CLOSED; + mci_close(mci, "reply:2"); return -1; } |