Changeset - e469bd961670
[Not reviewed]
default
0 2 0
LordOfWar - 16 years ago 2009-10-14 00:45:34

auto-initialized watchdog forgiveness, cleaned up for loop
2 files changed with 4 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/server/distrend.c
Show inline comments
 
@@ -729,13 +729,13 @@ int updateJobListXML(struct distrenjob *
 
  xmlTextWriterStartElement(writer, (xmlChar*)"job_list");
 

	
 
  _distren_asprintf(&tmp, "%d", general_info.jobs_in_queue);
 
  xmlTextWriterWriteAttribute(writer, (xmlChar*)"amount", (xmlChar*)tmp);
 

	
 
  counter = 0;
 
  for(job = head->next; !job; job = job->next)
 
  for(job = head->next; job; job = job->next)
 
    {
 
      _distren_asprintf(&tmp, "jobnum%d", counter);
 
      _distren_asprintf(&tmp2, "%d", job->jobnum);
 
      xmlTextWriterWriteElement(writer, (xmlChar*)tmp, (xmlChar*)tmp2);
 
      counter++;
 
    }
 
@@ -941,22 +941,22 @@ int main(int argc, char *argv[])
 
    {
 
      if(strcmp(argv[counter], "-h") == 0)
 
	{
 
	  fprintf(stderr, "Usage: distrend [option] \nStarts the distrend server\n\t-h\tshow this help\n\t-t\tlaunches queue testing interface \n");
 
	  return 2;
 
	}
 
      
 

	
 
      else if(strcmp(argv[counter], "-t") == 0)
 
	{
 
	  fprintf(stderr, "Entering into test mode...\n\n");
 
	  test=1;
 
	}
 
    }
 
  cont = 1;
 
  memset(&head, '\0', sizeof(struct distrenjob));
 
  
 

	
 
  start_data(&head); // Starts fresh or loads data from xml dump. Should we grab the return?
 

	
 
  distrend_do_config(argc, argv, &config);
 

	
 

	
 

	
src/server/distrenjob.c
Show inline comments
 
@@ -61,12 +61,13 @@ int distrenjob_new(struct distrenjob **d
 
  dj->width = 0;
 
  dj->height = 0;
 
  dj->completed_frames = 0;
 
  dj->assigned_frames = 0;
 
  dj->total_render_time = 0;
 
  dj->hibernate = 0;
 
  dj->watchdog_forgiveness = 3600; // initialize watchdog forgiveness at 1 hour
 
  dj->frameset = (struct frameset *)NULL; /*< @todo does frameset need to be initialized here? */
 

	
 
  return 0;
 
}
 

	
 
/**
0 comments (0 inline, 0 general)