Changeset - d34baf50c1b1
[Not reviewed]
default
0 1 0
LordOfWar - 16 years ago 2009-09-17 22:15:37

-prepare_distrenjob() now uses distrenjob_new() to initilize the job, but then assigns values from the parameters to their proper distrenjob variables
-removed unneeded comments/TODOs
1 file changed with 2 insertions and 11 deletions:
0 comments (0 inline, 0 general)
src/server/distrend.c
Show inline comments
 
@@ -191,6 +191,7 @@ void prepare_distrenjob(struct distrenjo
 
  int counter;
 

	
 
  struct distrenjob *distrenjob;
 
  distrenjob_new(&distrenjob);
 

	
 
  distrenjob->type = 1;
 
  distrenjob->name = name;
 
@@ -198,17 +199,6 @@ void prepare_distrenjob(struct distrenjo
 
  distrenjob->email = email;
 
  distrenjob->priority = priority;
 
  distrenjob->total_frames = (end_frame - start_frame + 1); // sets the total number of frames in animation for status purposes
 
  distrenjob->frameset = malloc(distrenjob->total_frames);
 

	
 
  distrenjob->assigned_frames = 0;
 
  distrenjob->completed_frames = 0;
 

	
 
  /* @TODO: should the aove be malloc(sizeof(struct frameset) * distrenjob->total_frames? */
 
  /*
 
  distrenjob->frameset = malloc(sizeof(struct frameset) * numframes);
 
  if(!job->frameset)
 
    fprintf(stderr, "Error allocating memory\n");
 
  */
 

	
 
  /* prepares all the frames by setting that status to "unassigned" */
 
  counter2 = start_frame;
 
@@ -219,6 +209,7 @@ void prepare_distrenjob(struct distrenjo
 
    counter2++;
 
  }
 

	
 
  /* add job to queue */
 
  distrenjob_enqueue(head, distrenjob);
 

	
 
  general_info.jobs_in_queue++;
0 comments (0 inline, 0 general)