diff --git a/src/server/distrend.c b/src/server/distrend.c --- a/src/server/distrend.c +++ b/src/server/distrend.c @@ -289,7 +289,7 @@ void change_job_priority(struct distrenj */ int find_jobframe(struct distrenjob *head, struct distrenjob **job, struct frameset **frame) { - int frame_counter; + unsigned int frame_counter; short int your_job_type; unsigned short int found; @@ -309,21 +309,16 @@ int find_jobframe(struct distrenjob *hea distrenjob_ptr->assigned_frames++; } - // end of while statement... job must be found or linked list must be ended to get out of here if(!found) { fprintf(stderr, "No more jobs to render\n"); + sleep(1); /*< @todo eliminate the need for this line*/ return 1; } - // the actual frame number to be rendered by the client is start_frame + your_frame *job = distrenjob_ptr; *frame = &distrenjob_ptr->frameset[frame_counter]; - /* should the job be removed now? ANSWER: well, if a computer decides not to return their frame then we lost our data... so its not done yet. */ - fprintf(stderr, "Job %d is finished, this is probably the place to call the job-removal function\n", distrenjob_ptr->jobnum); - /* @TODO: At this point, all slaves should be instructed to delete the source data for this job. */ - return 0; }