From: Thibault Godouet Date: Wed, 21 Jun 2000 14:58:44 +0000 (+0000) Subject: bug corrected : serial_array_index X-Git-Tag: ver2_9_4~662 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3004821799fca55b1011b54ecbb6403c937b39db;p=thirdparty%2Ffcron.git 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;