# HG changeset patch # User LordOfWar # Date 2009-09-12 23:46:21 # Node ID 11f9a3f8299d7a07ac97e51afd6004e3314f3d9e # Parent bbc92828afdd52d4a43905843575f428171dad60 made some slight adjustments trying to fix warnings... need god of coding aka Ohnobinki to look over the mess I made ^.^. diff --git a/src/server/distrend.c b/src/server/distrend.c --- a/src/server/distrend.c +++ b/src/server/distrend.c @@ -73,8 +73,9 @@ struct general_info { 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 @@ -167,7 +168,8 @@ void queue(int type, char *name, char *s 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 */ @@ -179,7 +181,8 @@ void queue(int type, char *name, char *s /* 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; @@ -328,12 +331,13 @@ void add_job_to_queue(struct distrenjob } 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;