diff --git a/src/server/distrend.c b/src/server/distrend.c --- a/src/server/distrend.c +++ b/src/server/distrend.c @@ -325,19 +325,19 @@ void frame_watchdog(struct distrenjob *d distrenjob_ptr = distrenjob_head; for(distrenjob_ptr = distrenjob_head; distrenjob_ptr; distrenjob_ptr = distrenjob_ptr->next) - /* iterate through jobs */ + /* iterate through jobs */ - for(counter = 0; counter < distrenjob_ptr->total_frames; counter ++) + /* if the job has been started, checks by seeing if either to first or second frame has been started */ + if(distrenjob_ptr->frameset[0].status != FRAMESETSTATUS_UNASSIGNED || distrenjob_ptr->frameset[1].status != FRAMESETSTATUS_UNASSIGNED) + for(counter = 0; counter < distrenjob_ptr->total_frames; counter ++) /* iterate through all frames for this job*/ - { + if((distrenjob_ptr->frameset[counter].start_time + distrenjob_ptr->watchdog_forgiveness) < clock()) - /* - If frame is not completed within the number of seconds specified by watchdog_forgiveness - Then change the frame status to unassigned - */ + /* + If frame is not completed within the number of seconds specified by watchdog_forgiveness + Then change the frame status to unassigned + */ distrenjob_ptr->frameset[counter].status = FRAMESETSTATUS_UNASSIGNED; - } - } /**