diff --git a/src/server/distrend.c b/src/server/distrend.c --- a/src/server/distrend.c +++ b/src/server/distrend.c @@ -20,22 +20,22 @@ /* This file contains the code which both processes (renders) jobs as a slave, and the code which distributes frames to slaves after receiving them from the client portion of the codebase. */ +#include "asprintf.h" +#include "distrenjob.h" #include "execio.h" +#include "listen.h" #include "options.h" -#include "distrenjob.h" -#include "listen.h" #include "protocol.h" #include "slavefuncs.h" -#include "asprintf.h" #include +#include #include #include -#include -#include +#include +#include #include -#include -#include +#include #include #include @@ -62,7 +62,8 @@ struct general_info { /* - internally defined funcs's prototypes @TODO: Make all functions nice and proper */ + internally defined funcs's prototypes @TODO: Make all functions nice and proper +*/ void distrenjob_remove(struct distrenjob *head, struct distrenjob *bj); struct distrenjob *distrenjob_get(struct distrenjob *head, jobnum_t jobnum); @@ -77,12 +78,6 @@ void importGeneralInfo(); int updateJobStatsXML(struct distrenjob *job); -/* Global Vars, eliminate 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 - - /* ********************** Functions ************************* */ /** Dumps all data in RAM to an xml file (such as current jobs, etc) which is parsed by start_data. Remember to invoke this before shutting down! */ @@ -146,7 +141,7 @@ int start_data(struct distrenjob *head, void finish_frame(struct distrenjob *head, struct distrenjob *distrenjob, int frame) { distrenjob->frameset[frame].status = FRAMESETSTATUS_DONE; - distrenjob->total_render_time = distrenjob->total_render_time + (clock() - distrenjob[jobnum].frameset[frame].start_time); + distrenjob->total_render_time = distrenjob->total_render_time + (clock() - distrenjob->frameset[frame].start_time); distrenjob->completed_frames++; distrenjob->assigned_frames--; general_info.total_frames_rendered++; // Increase total frames var for stats