# HG changeset patch # User LordOfWar # Date 2009-10-01 00:51:50 # Node ID 18e6f04a109216259d4643e5ea2ec939b4b7373a # Parent 8f09d07c0f15903b88c309f0f3d9444ecdfffb07 -created printAllJobnums() functions to... print all the job numbers in the queue in the order they will be processed -added printAllJobnums to user interface diff --git a/src/server/distrend.c b/src/server/distrend.c --- a/src/server/distrend.c +++ b/src/server/distrend.c @@ -485,6 +485,22 @@ void printJobInfo(struct distrenjob *job printf("prev_frame: %d", job->prev_frame_index); } +void printAllJobnums(struct distrenjob *head) +{ + struct distrenjob *current_job; + int total_jobs; + printf("job numbers in the order they will be processed:"); + + total_jobs = 0; + for(current_job = head; !current_job; current_job = current_job->next) + { + printf("%d", current_job->jobnum); + total_jobs++; + } + + printf("%d jobs in queue", total_jobs); +} + /* ************************** Main ************************* */ int main(int argc, char *argv[]) @@ -590,9 +606,12 @@ int main(int argc, char *argv[]) prepare_distrenjob(&head, type, name, submitter, email, priority, start_frame, end_frame); break; case 5: + printf("job number:"); + scanf("%d", &jobnum); distrenjob_remove(&head, distrenjob_get(&head, jobnum)); break; case 6: + printAllJobnums(&head); break; } }