]> granicus.if.org Git - fcron/commitdiff
bug corrected : serial_array_index
authorthib <thib>
Wed, 21 Jun 2000 14:58:44 +0000 (14:58 +0000)
committerthib <thib>
Wed, 21 Jun 2000 14:58:44 +0000 (14:58 +0000)
database.c

index 701b70a67abaa1a753618269d31c82e9ad0c0359..e5e39dd41bdc414a5fc0ac4e0d223822a6c01b00 100644 (file)
@@ -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;