Changeset - 02159cabda3c
[Not reviewed]
default
0 1 0
Nathan Brink (binki) - 16 years ago 2009-09-13 22:19:17
ohnobinki@ohnopublishing.net
rename add_job_to_queue() to distrenjob_enqueue()
1 file changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/server/distrend.c
Show inline comments
 
@@ -71,13 +71,13 @@ 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 *distrenjob_get(struct distrenjob *head, jobnum_t jobnum);
 
void add_job_to_queue(struct distrenjob *head, struct distrenjob *job);
 
void distrenjob_enqueue(struct distrenjob *head, struct distrenjob *job);
 

	
 
/* 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
 

	
 
@@ -191,13 +191,13 @@ void prepare_distrenjob(struct frameset 
 
    distrenjob->frameset[counter].status = 0;
 

	
 
    counter2++;
 
  }
 

	
 
  /* @TODO: change frame_num_struct_builder to add_blendjob_to_queue */
 
  add_job_to_queue(head, distrenjob);
 
  distrenjob_enqueue(head, distrenjob);
 

	
 
  general_info.jobs_in_queue++;
 
}
 

	
 
/** -- OLD -- Queuer: Adds files to the queue
 
int queue(struct distrenjob *distrenjob, int type, char *name, char *submitter, char *email, int priority, int mode, int spp, struct frameset *frameset) {
 
@@ -315,13 +315,13 @@ void status_report_generator(struct dist
 

	
 

	
 
/**
 
   Structure Builder: This function creates frame array based on the total number of frames to be rendered, which will then be parsed by function frame_farmer.
 
*/
 
/** Structure Builder: This function creates frame array based on the total number of frames to be rendered, which will then be parsed by function frame_farmer. */
 
void add_job_to_queue(struct distrenjob *head, struct distrenjob *job) {
 
void distrenjob_enqueue(struct distrenjob *head, struct distrenjob *job) {
 
  struct distrenjob *prev_job = head; // create pointer to previous job
 
  struct distrenjob *current_job;     // create pointer to current_job (which job is being compared to)
 

	
 
  // iterate through linked list of jobs
 
  for(current_job = head; current_job != NULL; current_job = current_job->next){
 
    if(current_job == NULL){ // if it has reached the end of the list, add job there
 
@@ -345,13 +345,13 @@ void change_job_priority(struct distrenj
 
  distrenjob_remove(head, job);
 
  job->priority = new_priority;
 
  struct distrenjob *current_job;
 
  struct distrenjob *prev_job = head;
 

	
 
  if(job->frameset[0].status == 0){ // if job was not yet started
 
    add_job_to_queue(head, job);
 
    distrenjob_enqueue(head, job);
 
  }
 
  else{ // if job has already been started then place it before the jobs with the same priority
 
    // iterate through linked list of jobs
 
    for(current_job = head; current_job != NULL; current_job = current_job->next){
 
      if(current_job == NULL){ // if it has reached the end of the list, add job there
 
        current_job = job;
0 comments (0 inline, 0 general)