From: thib Date: Wed, 21 Jun 2000 14:58:44 +0000 (+0000) Subject: bug corrected : serial_array_index X-Git-Tag: ver1564~588 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c6cd7b8d6b5b3c23f1caa2b58bb77848a0b700b2;p=fcron bug corrected : serial_array_index --- diff --git a/database.c b/database.c index 701b70a..e5e39dd 100644 --- a/database.c +++ b/database.c @@ -22,7 +22,7 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: database.c,v 1.14 2000-06-21 13:44:27 thib Exp $ */ + /* $Id: database.c,v 1.15 2000-06-21 14:58:44 thib Exp $ */ #include "fcron.h" @@ -123,7 +123,8 @@ run_serial_job(void) run_queue_job(serial_array[serial_array_index]); serial_running++; - serial_array_index++; + if ( ++serial_array_index >= serial_array_size ) + serial_array_index -= serial_array_size; serial_num--; } @@ -135,6 +136,10 @@ run_queue_job(CL *line) /* run the next non-serialized job */ { + // + debug("run_queue_job"); + // + /* append job to the list of executed job */ if ( exe_num >= exe_array_size ) { CL **ptr = NULL;