# HG changeset patch # User LordOfWar # Date 2009-09-12 18:02:54 # Node ID ecb6efb70fb107fe597c02e48c96624061954063 # Parent 696ff13a2442f9222fad7bec8a5d9806bb4e3231 changed the \".\" to \"->\" in add_job_to_queue function because the structures are pointers. diff --git a/src/server/distrend.c b/src/server/distrend.c --- a/src/server/distrend.c +++ b/src/server/distrend.c @@ -312,14 +312,14 @@ void add_job_to_queue(struct distrenjob 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){ + 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; break; } - else if(job.priority < current_job.priority){ // if job's priority is less than current_job's priority, insert job - prev_job.next = job; // keep in mind 1 is the lowest priority - job.next = current_job; + else if(job->priority < current_job->priority){ // if job's priority is less than current_job's priority, insert job + prev_job->next = job; // keep in mind 1 is the lowest priority + job->next = current_job; break; } } // end of for statement