Changeset - b8b84581af27
[Not reviewed]
default
0 1 0
LordOfWar - 16 years ago 2009-10-14 01:14:03

initialized variables, prepare_distrenjob gives out a jobnumber now, added fprintfs to identify areas of error
1 file changed with 16 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/server/distrend.c
Show inline comments
 
@@ -255,12 +255,15 @@ int prepare_distrenjob(struct distrenjob
 

	
 
  struct distrenjob *distrenjob;
 
  tmp = distrenjob_new(&distrenjob);
 
  if(tmp)
 
    return 1;
 

	
 
  general_info.highest_jobnum++;
 

	
 
  distrenjob->jobnum = general_info.highest_jobnum;
 
  distrenjob->type = 1;
 
  distrenjob->name = name;
 
  distrenjob->submitter = submitter;
 
  distrenjob->email = email;
 
  distrenjob->priority = priority;
 
  distrenjob->width = width;
 
@@ -280,18 +283,23 @@ int prepare_distrenjob(struct distrenjob
 
    distrenjob->frameset[counter].status = FRAMESETSTATUS_UNASSIGNED;
 

	
 
    counter2++;
 
  }
 

	
 
  /* add job to queue */
 
  fprintf(stderr, "\nprepare_distrenjob: attempting makeJobDataXML()\n");
 
  makeJobDataXML(distrenjob);
 
  fprintf(stderr, "\nprepare_distrenjob: attempting distrenjob_enqueue()\n");
 
  distrenjob_enqueue(head, distrenjob);
 

	
 
  general_info.jobs_in_queue++;
 
  fprintf(stderr, "\nprepare_distrenjob: attempting updateJobListXML()\n");
 
  updateJobListXML(head);
 
  fprintf(stderr, "\nprepare_distrenjob: attempting updateGeneralInfo()\n");
 
  updateGeneralInfo();
 
  fprintf(stderr, "\nprepare_distrenjob: attempting updateJobStatsXML()\n");
 
  updateJobStatsXML(distrenjob);
 

	
 
  return 0;
 
}
 

	
 

	
 
@@ -913,12 +921,20 @@ int main(int argc, char *argv[])
 
  {
 
    CLIENTSTATUS_UNINITIALIZED = 0,
 
    CLIENTSTATUS_BUSY = 1,
 
    CLIENTSTATUS_IDLE = 2
 
  } clientstatus;
 

	
 
  // initialize general_info struct, this should be done by start_data()
 
  general_info.jobs_in_queue = 0;
 
  general_info.free_clients = 0;
 
  general_info.rendering_clients = 0;
 
  general_info.total_finished_jobs = 0;
 
  general_info.total_frames_rendered = 0;
 
  general_info.highest_jobnum = 0;
 
  general_info.hibernate = 0;
 

	
 
  int command;
 
  jobnum_t jobnum;
 
  struct distrenjob *tmp_job;
 
  struct frameset *tmp_frame;
 
  int type;
0 comments (0 inline, 0 general)