]> granicus.if.org Git - fcron/commitdiff
bug fix : new non-volatile @-line were set an erroneous first time and date of execution
authorthib <thib>
Sat, 2 Nov 2002 19:33:25 +0000 (19:33 +0000)
committerthib <thib>
Sat, 2 Nov 2002 19:33:25 +0000 (19:33 +0000)
conf.c
fileconf.c

diff --git a/conf.c b/conf.c
index 58120d82e718e51ab6574fec2b738024c706dacd..69a3f1b7097d2b6d7e49bd9a8cad81895f10f121 100644 (file)
--- a/conf.c
+++ b/conf.c
@@ -22,7 +22,7 @@
  *  `LICENSE' that comes with the fcron source distribution.
  */
 
- /* $Id: conf.c,v 1.62 2002-11-01 18:13:49 thib Exp $ */
+ /* $Id: conf.c,v 1.63 2002-11-02 19:34:55 thib Exp $ */
 
 #include "fcron.h"
 
@@ -794,7 +794,7 @@ add_line_to_file(cl_t *cl, cf_t *cf, uid_t runas, char *runas_str, time_t t_save
            insert_nextexe(cl);
     } else {  /* is_td(cl->cl_option) */
        /* standard @-lines */
-       if ( is_volatile(cl->cl_option) || cl->cl_first > 0 ) {
+       if ( is_volatile(cl->cl_option) ) {
            /* cl_first is always saved for a volatile line */
            cl->cl_nextexe = now + cl->cl_first;
        } else
index 438a5f6f134858712c88581f21492a7ceee827d1..7ddd217f95cbdbcf6cc65e86320d7cc780fdd228 100644 (file)
@@ -22,7 +22,7 @@
  *  `LICENSE' that comes with the fcron source distribution.
  */
 
- /* $Id: fileconf.c,v 1.67 2002-11-01 18:08:30 thib Exp $ */
+ /* $Id: fileconf.c,v 1.68 2002-11-02 19:33:25 thib Exp $ */
 
 #include "fcrontab.h"
 
@@ -1122,9 +1122,11 @@ read_freq(char *ptr, cf_t *cf)
        goto exiterr;
     }
 
-    if ( cl->cl_first == -1 )
+    if ( is_volatile(cl->cl_option) && cl->cl_first == -1 )
        /* time before first execution is not specified */
        cl->cl_first = cl->cl_timefreq;
+    else
+       cl->cl_nextexe = cl->cl_timefreq;
 
     /* check for inline runas */
     ptr = check_username(ptr, cf, cl);