diff --git a/src/server/distrend.c b/src/server/distrend.c --- a/src/server/distrend.c +++ b/src/server/distrend.c @@ -299,6 +299,8 @@ void frame_num_struct_builder(struct ble TODO: Major issue here, the client needs to know the frame number, AND the job number! Notice that this function starts by looking at the oldest job first + TODO: Link this up with the main() function to check if there are frames available or not and provide jobnum/framenum to the client + @return 0 success, other: error */ int frame_finder(struct blendjob *head, struct blendjob **job, struct frameset **frame) @@ -511,10 +513,14 @@ int main(int argc, char *argv[]) int jobnum; /* If the client is idle (meaning a client without the "busy" status connected via ssh) */ - if(clientstatus == idle && iteration > 0){ - framenum = frame_finder(); // give framefinder args, framefinder should return job number and frame number - jobnum = frame_finder(); - remotio_send_to_client(framenum); + if(clientstatus == "idle"){ + framenum / jobnum = frame_finder(); // give framefinder args, framefinder should return job number and frame number somehow + if(frame_finder returns "didn't get a frame"){ + fprinf(stderr,"No frames are available to render at this time"); + } + else(){ + remotio_send_to_client(framenum); + } } /* If the client's status changes from running to idle */ if(clientstatus == DISTREN_REQUEST_DONEFRAME && iteration == 0){