]> diplodocus.org Git - nmh/blobdiff - mts/smtp/smtp.c
new.c: Order two return statements to match comment.
[nmh] / mts / smtp / smtp.c
index 3d2a8e5b6784f575b9d724e747614e63cedc2f59..f9500bc625230caf3eca92bba645301b671fc694 100644 (file)
@@ -13,7 +13,7 @@
 #include <h/netsec.h>
 
 #include <sys/socket.h>
-#include "../../sbr/base64.h"
+#include "sbr/base64.h"
 
 /*
  * This module implements an interface to SendMail very similar
@@ -307,9 +307,7 @@ sendmail_init (char *client, int watch, int verbose, int debug, int sasl,
        return sm_ierror ("no pipes");
     }
 
-    for (i = 0; (sm_child = fork ()) == NOTOK && i < 5; i++)
-       sleep (5);
-
+    sm_child = fork();
     switch (sm_child) {
        case NOTOK: 
            close (pdo[0]);
@@ -349,7 +347,7 @@ sendmail_init (char *client, int watch, int verbose, int debug, int sasl,
            close (pdi[1]);
            close (pdo[0]);
 
-           netsec_set_fd(nsc, pdi[i], pdo[1]);
+           netsec_set_fd(nsc, pdi[0], pdo[1]);
            netsec_set_timeout(nsc, SM_OPEN);
            result = smhear ();
            switch (result) {
@@ -535,14 +533,14 @@ sm_wtxt (char *buffer, int len)
 
     result = sm_wstream (buffer, len);
 
-    return (result == NOTOK ? RP_BHST : RP_OK);
+    return result == NOTOK ? RP_BHST : RP_OK;
 }
 
 
 int
 sm_wtend (void)
 {
-    if (sm_wstream ((char *) NULL, 0) == NOTOK)
+    if (sm_wstream(NULL, 0) == NOTOK)
        return RP_BHST;
 
     switch (smtalk (SM_DOT + 3 * sm_addrs, ".")) {
@@ -634,7 +632,7 @@ sm_end (int type)
        status = OK;
     }
 
-    return (status ? RP_BHST : RP_OK);
+    return status ? RP_BHST : RP_OK;
 }