Changeset - c4f66bfa3890
[Not reviewed]
default
0 1 0
Nathan Brink (binki) - 16 years ago 2009-10-10 01:01:37
ohnobinki@ohnopublishing.net
frame_watchdog(): fix linked list access
1 file changed with 3 insertions and 6 deletions:
0 comments (0 inline, 0 general)
src/server/distrend.c
Show inline comments
 
@@ -353,23 +353,20 @@ int find_jobframe(struct distrenjob *hea
 
/** Checks for dead, latent, or stale slaves */
 
void frame_watchdog(struct distrenjob *distrenjob_head)
 
{
 
  struct distrenjob *distrenjob_ptr;
 
  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)
 
  for(distrenjob_ptr = distrenjob_head->next; distrenjob_ptr; distrenjob_ptr = distrenjob_ptr->next)
 
  /* iterate through jobs */
 

	
 
    /* 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)
 
      /* iterate through all frames for this job: */
 
      for(counter = 0; counter < distrenjob_ptr->total_frames; counter ++)
 
      /* iterate through all frames for this job*/
 

	
 
	/*watchdog_forgiveness = seconds of forgiveness before frame is re-assigned: */
 
        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
 
        */
 
          distrenjob_ptr->frameset[counter].status = FRAMESETSTATUS_UNASSIGNED;
0 comments (0 inline, 0 general)