diff --git a/src/server/distrend.c b/src/server/distrend.c --- a/src/server/distrend.c +++ b/src/server/distrend.c @@ -521,12 +521,16 @@ int main(int argc, char *argv[]) /* If the client is idle (meaning a client without the "busy" status connected via ssh) */ if(clientstatus == "idle") { - framenum / jobnum = frame_finder(&head, job, frame); // give framefinder args, framefinder should return job number and frame number somehow - if(frame_finder returns "didn't get a frame"){ + int returnnum = frame_finder(&head, job, frame); // give framefinder args, framefinder should return job number and frame number somehow + if(returnnum == 1){ fprinf(stderr,"No frames are available to render at this time"); + sleep(10); + } + else if(returnnum == 0){ + remotio_send_to_client(framenum, jobnum); } else(){ - remotio_send_to_client(framenum, jobnum); + fprintf(stderr,"Something is terribly wrong!"); } } /* If the client's status changes from running to idle */