fix another problem in the MCI state machine
authorEric Allman <eric@ucbvax.Berkeley.EDU>
Mon, 15 Feb 1993 11:04:46 +0000 (03:04 -0800)
committerEric Allman <eric@ucbvax.Berkeley.EDU>
Mon, 15 Feb 1993 11:04:46 +0000 (03:04 -0800)
SCCS-vsn: usr.sbin/sendmail/src/usersmtp.c 6.6
SCCS-vsn: usr.sbin/sendmail/src/version.c 6.20

usr/src/usr.sbin/sendmail/src/usersmtp.c
usr/src/usr.sbin/sendmail/src/version.c

index c45e266..4bda750 100644 (file)
@@ -10,9 +10,9 @@
 
 #ifndef lint
 #ifdef SMTP
 
 #ifndef lint
 #ifdef SMTP
-static char sccsid[] = "@(#)usersmtp.c 6.5 (Berkeley) %G% (with SMTP)";
+static char sccsid[] = "@(#)usersmtp.c 6.6 (Berkeley) %G% (with SMTP)";
 #else
 #else
-static char sccsid[] = "@(#)usersmtp.c 6.5 (Berkeley) %G% (without SMTP)";
+static char sccsid[] = "@(#)usersmtp.c 6.6 (Berkeley) %G% (without SMTP)";
 #endif
 #endif /* not lint */
 
 #endif
 #endif /* not lint */
 
@@ -300,11 +300,20 @@ smtpdata(m, mci, e)
        setproctitle("%s %s: %s", e->e_id, CurHostName, mci->mci_phase);
        r = reply(m, mci, e, ReadTimeout);
        if (r < 0 || REPLYTYPE(r) == 4)
        setproctitle("%s %s: %s", e->e_id, CurHostName, mci->mci_phase);
        r = reply(m, mci, e, ReadTimeout);
        if (r < 0 || REPLYTYPE(r) == 4)
+       {
+               smtpquit(m, mci, e);
                return (EX_TEMPFAIL);
                return (EX_TEMPFAIL);
+       }
        else if (r == 554)
        else if (r == 554)
+       {
+               smtprset(m, mci, e);
                return (EX_UNAVAILABLE);
                return (EX_UNAVAILABLE);
+       }
        else if (r != 354)
        else if (r != 354)
+       {
+               smtprset(m, mci, e);
                return (EX_PROTOCOL);
                return (EX_PROTOCOL);
+       }
 
        /* now output the actual message */
        (*e->e_puthdr)(mci->mci_out, m, e);
 
        /* now output the actual message */
        (*e->e_puthdr)(mci->mci_out, m, e);
@@ -321,7 +330,10 @@ smtpdata(m, mci, e)
        setproctitle("%s %s: %s", e->e_id, CurHostName, mci->mci_phase);
        r = reply(m, mci, e, ReadTimeout);
        if (r < 0)
        setproctitle("%s %s: %s", e->e_id, CurHostName, mci->mci_phase);
        r = reply(m, mci, e, ReadTimeout);
        if (r < 0)
+       {
+               smtpquit(m, mci, e);
                return (EX_TEMPFAIL);
                return (EX_TEMPFAIL);
+       }
        mci->mci_state = MCIS_OPEN;
        if (REPLYTYPE(r) == 4)
                return (EX_TEMPFAIL);
        mci->mci_state = MCIS_OPEN;
        if (REPLYTYPE(r) == 4)
                return (EX_TEMPFAIL);
index 1a4f627..aacdb8f 100644 (file)
@@ -7,7 +7,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)version.c  6.19 (Berkeley) %G%";
+static char sccsid[] = "@(#)version.c  6.20 (Berkeley) %G%";
 #endif /* not lint */
 
 #endif /* not lint */
 
-char   Version[] = "ALPHA-6.19";
+char   Version[] = "ALPHA-6.20";