Index: /branches/eam_branches/eam_branch_20090322/Ohana/src/opihi/pantasks/CheckTasks.c
===================================================================
--- /branches/eam_branches/eam_branch_20090322/Ohana/src/opihi/pantasks/CheckTasks.c	(revision 23511)
+++ /branches/eam_branches/eam_branch_20090322/Ohana/src/opihi/pantasks/CheckTasks.c	(revision 23512)
@@ -7,5 +7,4 @@
   int status;
   float time_running, next_timeout, fuzz;
-  // struct timeval now;
 
   // actual maximum delay is controlled in job_threads.c
@@ -66,7 +65,4 @@
     }
 
-    // gettimeofday (&now, (void *) NULL);
-    // fprintf (stderr, "t1: %d %6d  - \n", now.tv_sec, now.tv_usec);
-
     /* check if there are errors with this task */
     if (!ValidateTask (task, TRUE)) { 
@@ -74,26 +70,14 @@
     }
     
-    // gettimeofday (&now, (void *) NULL);
-    // fprintf (stderr, "t2: %d %6d  - \n", now.tv_sec, now.tv_usec);
-
     /* construct job from task */
     job = CreateJob (task);
     if (DEBUG) fprintf (stderr, "create job: (%zx) %d of %d\n", (size_t) job[0].stdout_buff.buffer, job[0].stdout_buff.Nbuffer, job[0].stdout_buff.Nalloc); 
 
-    // gettimeofday (&now, (void *) NULL);
-    // fprintf (stderr, "t3: %d %6d  - \n", now.tv_sec, now.tv_usec);
-
-    /* execute job - XXX add status test */
-    SubmitJob (job);
-
-    // fprintf (stderr, "nl: %d %6d  - ",
-    // task[0].last.tv_sec, task[0].last.tv_usec);
-
-    /* increment job counters */
-    task[0].Njobs ++;
-    task[0].Npending ++;
-
-    // fprintf (stderr, "%d %6d\n", 
-    // task[0].last.tv_sec, task[0].last.tv_usec);
+    /* execute job */
+    if (!SubmitJob (job)) {
+      DeleteJob (job);
+      continue;
+    }
+    task[0].Njobs ++; // number of jobs successfully submitted
 
     /* increment Nrun for inclusive ranges with Nmax */
