diff --git a/src/server/distrend.c b/src/server/distrend.c --- a/src/server/distrend.c +++ b/src/server/distrend.c @@ -86,6 +86,7 @@ struct blendjob { char *name; char *submitter; char *email; + unsigned int jobnum; int priority; // 1 is lowest, 10 is highest, 0 is done int percent_done; int completed_frames; // number of completed frames for stats/etc @@ -215,13 +216,16 @@ void frame_num_struct_builder(struct ble int jobnum_new = highest_jobnum + 1; /* global vars will someday leave us */ int counter; - + job->frameset = malloc(sizeof(struct frameset) * numframes); + if(!job->frameset) + fprintf(stderr, "error allocating memory"); - blendjob[jobnum_new].total_frames = total; // sets the total number of frames in animation for status purposes + job->total_frames = total; // sets the total number of frames in animation for status purposes + job->jobnum = jobnum_new; for(counter = 0; counter < total; counter ++) /* This builds the array, with the array starting at zero and the frame_num starting at sframe */ - blendjob[jobnum_new].frameset[x].frame_num = counter + 1; + job->frameset[counter].frame_num = counter + 1; highest_jobnum++; // After it has created the job, it adds one to the highest_jobnum interger }