Changeset - 11f9a3f8299d
[Not reviewed]
default
0 1 0
LordOfWar - 16 years ago 2009-09-12 23:46:21

made some slight adjustments trying to fix warnings... need god of coding aka Ohnobinki to look over the mess I made ^.^.
1 file changed with 9 insertions and 5 deletions:
0 comments (0 inline, 0 general)
src/server/distrend.c
Show inline comments
 
@@ -70,14 +70,15 @@ struct general_info {
 
/*
 
  internally defined funcs's prototypes
 
*/
 
void status_report_generator(struct distrenjob **distrenjobs_head);
 
void distrenjob_remove(struct distrenjob **head, struct distrenjob *bj);
 

	
 
//struct distrenjob *head(); /*@TODO:declare struct with no starting data */
 

	
 
struct distrenjob *distrenjob_get(struct distrenjob *head, jobnum_t jobnum);
 
struct distrenjob *head; /*@TODO:declare struct with no starting data */
 

	
 
/* Global Vars, try to cut down on these */
 
jobnum_t jobnum = 0; // The next job number to create in the queue
 
int hcfjob; // Highest consecutively finished job
 
int highest_jobnum; // The job number of the most recently created job, this is used when creating new jobs
 

	
 
@@ -164,25 +165,27 @@ void queue(int type, char *name, char *s
 
  struct distrenjob *distrenjob;
 
  distrenjob->type = 1; /*@TODO: add type to blendjob struct*/
 
  distrenjob->name = name;
 
  distrenjob->submitter = submitter;
 
  distrenjob->email = email;
 
  distrenjob->priority = priority;
 
  distrenjob->frameset = frameset[end_frame - start_frame + 1];
 
  struct frameset[(end_frame - start_frame + 1)];
 
  distrenjob->frameset = &frameset;
 
  distrenjob->total_frames = (end_frame - start_frame + 1); // sets the total number of frames in animation for status purposes
 

	
 
  /* @TODO: what does this do? frameset array is declared above */
 
  /*
 
  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" */
 
  int counter2 = start_frame;
 
  for(int counter = 0; counter <= (end_frame- start_frame + 1); counter++){
 
  int counter;
 
  for(counter = 0; counter <= (end_frame- start_frame + 1); counter++){
 
    distrenjob->frameset[counter].num = counter2;
 
    distrenjob->frameset[counter].status = 0;
 

	
 
    counter2++;
 
  }
 

	
 
@@ -325,18 +328,19 @@ void add_job_to_queue(struct distrenjob 
 

	
 
    prev_job = current_job;
 
  } // end of for statement
 
}
 

	
 
void change_job_priority(int jobnum, int new_priority){
 
  struct distrenjob *job = &remove_job(jobnum);
 
  struct distrenjob *job;
 
  job = remove_job(jobnum);
 
  job->priority = new_priority;
 
  add_job_to_queue(job);
 
}
 

	
 
distrenjob remove_job(int jobnum_t){
 
distrenjob *remove_job(int jobnum_t){
 
  struct distrenjob *job;
 
  struct distrenjob *prev_job = head;
 

	
 
  for(job = head; job != NULL; job = job->next){
 
    if(job == NULL){
 
      return NULL;
0 comments (0 inline, 0 general)