display all retrieved jobs, including the last one
authorAleš Křenek <ljocha@ics.muni.cz>
Mon, 19 May 2008 15:41:29 +0000 (15:41 +0000)
committerAleš Křenek <ljocha@ics.muni.cz>
Mon, 19 May 2008 15:41:29 +0000 (15:41 +0000)
org.glite.lb.client/examples/user-jobs.pl

index 2ad5d08..658396d 100755 (executable)
@@ -36,7 +36,7 @@ $body = $resp->body();
 # follow the response structure and pick just jobids and states to print
 unless ($fault) {
        $njobs = $#{$body->{UserJobsResponse}->{jobs}};
-       for ($i = 0; $i < $njobs; $i++) {
+       for ($i = 0; $i <= $njobs; $i++) {
                print "$body->{UserJobsResponse}->{jobs}->[$i]\t",
                      $body->{UserJobsResponse}->{states} ? $body->{UserJobsResponse}->{states}->[$i]->{state} : '',
                      "\n";