From 2586450e017ae1f3c3e7dac73b9ccf94e0df438d Mon Sep 17 00:00:00 2001 From: thib Date: Sat, 2 Nov 2002 19:33:25 +0000 Subject: [PATCH] bug fix : new non-volatile @-line were set an erroneous first time and date of execution --- conf.c | 4 ++-- fileconf.c | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/conf.c b/conf.c index 58120d8..69a3f1b 100644 --- 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 diff --git a/fileconf.c b/fileconf.c index 438a5f6..7ddd217 100644 --- a/fileconf.c +++ b/fileconf.c @@ -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); -- 2.50.1