# HG changeset patch # User ethanzonca # Date 2009-07-14 19:42:04 # Node ID 25d211484befaa98a0e2cb0defc23006cf671e41 # Parent c2382642e8aa650dc34c70b91d22f393387c76c6 Some commenting diff --git a/src/server/distrend.c b/src/server/distrend.c --- a/src/server/distrend.c +++ b/src/server/distrend.c @@ -85,11 +85,11 @@ struct blendjob { char *submitter; char *email; unsigned int jobnum; - int priority; // 1 is lowest, 10 is highest, 0 is done + int priority; // 1 is lowest, 10 is highest, 0 means the job is done int percent_done; int completed_frames; // number of completed frames for stats/etc int assigned_frames; // number of assigned frames (that are not yet completed) for stats/etc - int total_frames; // how many frames are in the animation for stats/etc + int total_frames; // how many frames are in the animation for stats/etc (unassigned frames) int avg_render_time; // average seconds it took to render a frame unsigned int time_remaining; // estimated seconds remaining till render is complete (up to 49, 710 days) // we can have the client computer convert it into days, hours, etc if they wish to view it @@ -127,9 +127,9 @@ void start_data(){ void finish_frame(int jobnum, int frame){ blendjob[jobnum].frameset[frame].frame_status = 2; - blendjob[jobnum].frameset[frame].time_to_render = (clock() - blendjob[jobnum].frameset[frame].start_time); + blendjob[jobnum].frameset[frame].time_to_render = (clock() - blendjob[jobnum].frameset[frame].start_time); // Consider changin time-to-render to time-for-frame or something? - general_info.total_frames_rendered++; + general_info.total_frames_rendered++; // Increase total frames var for stats } @@ -224,7 +224,7 @@ void frame_num_struct_builder(struct ble for(counter = 0; counter < total; counter ++) /* This builds the array, with the array starting at zero and the frame_num starting at sframe */ job->frameset[counter].frame_num = counter + 1; - + highest_jobnum++; // After it has created the job, it adds one to the highest_jobnum interger } @@ -301,7 +301,7 @@ void blend_frame_watchdog(){ int main(int argc, char *argv[]) { -//// Begin Getopt Sample +//// Begin Getopt Sample, EDITME!Sometime int aflag = 0; int bflag = 0; char *cvalue = NULL; @@ -500,15 +500,12 @@ void loginuser(char *username, int secre // Executors +// It seems that the client will need to know the job number. Is finish_frame going to be on the client or the server? we gotta figure that out! void exec_blender(char *input, char *output, int frame, int jobnum) { char *frame_str; - asprintf(frame,frame_str); // GNU/*nix compatible only, fix before releasing win32! + asprintf(frame,frame_str); // GNU/*nix compatible only, fix before releasing win32, although dll for windows for asprintf exists! int ret; - /* SEGFAULTAGE :-D */ char *cmd[] = { "blender", "-b", "-o", output, input, "-f", frame_str, (char *)0 }; ret = execv("/usr/bin/blender", cmd); - - // OHNOBINKI! ... check this... Its supposed to send a command back to the server and run the_finisher(); function which sets the frame status to complete. - /* You can't print the return value of a function that returns nothing (void) */ finish_frame(jobnum, frame); }