]> granicus.if.org Git - fcron/commitdiff
bug corrected : configure's --without-sendmail wasn't working
authorthib <thib>
Sat, 10 Feb 2001 12:53:57 +0000 (12:53 +0000)
committerthib <thib>
Sat, 10 Feb 2001 12:53:57 +0000 (12:53 +0000)
fileconf.c
job.c

index d7853a6ab52b794ff08b247ab612600784e43d25..7dd494deef4862fdf66b7879c31e4abece621763 100644 (file)
@@ -22,7 +22,7 @@
  *  `LICENSE' that comes with the fcron source distribution.
  */
 
- /* $Id: fileconf.c,v 1.38 2001-02-01 20:49:31 thib Exp $ */
+ /* $Id: fileconf.c,v 1.39 2001-02-10 12:53:57 thib Exp $ */
 
 #include "fcrontab.h"
 
@@ -1030,6 +1030,10 @@ read_freq(char *ptr, CF *cf)
        goto exiterr;
     }
 
+#ifndef SENDMAIL
+    clear_mail(cl->cl_option);
+#endif
+
     cl->cl_next = cf->cf_line_base;
     cf->cf_line_base = cl;
 
@@ -1126,6 +1130,10 @@ read_arys(char *ptr, CF *cf)
        goto exiterr;
     }
 
+#ifndef SENDMAIL
+    clear_mail(cl->cl_option);
+#endif
+
     cl->cl_next = cf->cf_line_base;
     cf->cf_line_base = cl;
 
@@ -1254,6 +1262,10 @@ read_period(char *ptr, CF *cf)
     }
 
   ok:
+#ifndef SENDMAIL
+    clear_mail(cl->cl_option);
+#endif
+
     cl->cl_next = cf->cf_line_base;
     cf->cf_line_base = cl;
 
diff --git a/job.c b/job.c
index b47e2d4f26593e35969a430ea677957465148fc4..ad3f162279ccd37f1f9a4b8590bbac7987cab164 100644 (file)
--- a/job.c
+++ b/job.c
@@ -22,7 +22,7 @@
  *  `LICENSE' that comes with the fcron source distribution.
  */
 
- /* $Id: job.c,v 1.33 2001-02-01 20:52:06 thib Exp $ */
+ /* $Id: job.c,v 1.34 2001-02-10 12:56:12 thib Exp $ */
 
 #include "fcron.h"
 
@@ -307,6 +307,7 @@ void
 launch_mailer(CL *line, int mailfd)
     /* mail the output of a job to user */
 {
+#ifdef SENDMAIL
     foreground = 0;
 
     /* set stdin to the job's output */
@@ -320,7 +321,9 @@ launch_mailer(CL *line, int mailfd)
     error_e("Can't find \""SENDMAIL"\". Trying a execlp(\"sendmail\")");
     execlp("sendmail", "sendmail", SENDMAIL_ARGS, line->cl_mailto, NULL);
     die_e("Can't exec " SENDMAIL);
-
+#else /* defined(SENDMAIL) */
+    exit(EXIT_OK);
+#endif
 }
 
 int