Changeset - 00f305617cde
[Not reviewed]
default
0 1 0
LordOfWar - 16 years ago 2009-09-18 01:44:13

in frame_watchdog() I added a test to see if the job has been started or not, if it has been started then it will scan it, if not it skips it.
1 file changed with 9 insertions and 9 deletions:
0 comments (0 inline, 0 general)
src/server/distrend.c
Show inline comments
 
@@ -322,25 +322,25 @@ void frame_watchdog(struct distrenjob *d
 
  unsigned int counter;
 

	
 
  /*watchdog_forgiveness = seconds of forgiveness before frame is re-assigned */
 
  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;
 
      }
 

	
 
}
 

	
 
/**
 
   Finds a distrenjob struct based on the jobnum
 
   @arg jobnum job number to search for
 
   @return NULL on job doesn't exist
0 comments (0 inline, 0 general)