# HG changeset patch # User ethanzonca # Date 2009-07-28 17:46:34 # Node ID 31771fb6594ef0028bbf89e8f4970fbaa8d23384 # Parent ef446502e0ae5a3febe9b57ffd665385abe7cb13 Updated a bit. diff --git a/src/server/distrend.c b/src/server/distrend.c --- a/src/server/distrend.c +++ b/src/server/distrend.c @@ -492,7 +492,7 @@ int main(int argc, char *argv[]) start_data(); status_report_generator(&head); - blend_frame_watchdog(head); // TODO: Add correct args + blend_frame_watchdog(head); struct frameset *frame; @@ -501,7 +501,7 @@ int main(int argc, char *argv[]) /* If the client is idle (meaning a client without the "busy" status connected via ssh) */ if(clientstatus == CLIENTSTATUS_IDLE) { - /** + /** normaldotcom: learn about ``return by pointer'' */ int returnnum = frame_finder(head, &job, &frame); // give framefinder args, framefinder should return job number and frame number somehow @@ -512,13 +512,16 @@ int main(int argc, char *argv[]) } else /* returnnum == 0 */ - remotio_send_to_client(frame->num, job->jobnum); + remotio_send_to_client(frame->num, job->jobnum); // Did you actually make this function, ohnobinki? --normaldotcom } - /* If the client's status changes from running to idle */ - if(clientsays == DISTREN_REQUEST_DONEFRAME && iteration == 0){ - clientstatus = CLIENTSTATUS_IDLE; - finish_frame(jobnum, framenumprevious); // make it finish the previous frame or something. - frame_finder() ==> returns jobnum/framenum that are sent to slave, "render jobnum framenum" + /* If the client states that they finished the frame */ + if(clientsays == DISTREN_REQUEST_DONEFRAME){ + clientstatus = CLIENTSTATUS_IDLE; + finish_frame(jobnum, framenumprevious); // make it finish the previous frame or something. + int returnnum = frame_finder(head, &job, &frame); + if(returnnum){ + fprintf(stderr,"No frames are available to render at this time"); + } } /* End Somewhat Pseudo-code */