diff --git a/src/server/slave.c b/src/server/slave.c --- a/src/server/slave.c +++ b/src/server/slave.c @@ -27,11 +27,15 @@ * ********************************************************************************** */ +// Provides DISTREN_REQUEST* which is in reality, DISTREN_SEND(signal) +#include "protocol.h" + int main(int argc, char *arvg[]) { ///////////////////// Semi-pseudo Slave Code /////////////////////////// + int slavestatus = 0; if('no username in config file, no key present'){ @@ -53,16 +57,15 @@ int main(int argc, char *arvg[]) exec_blender(jobname.blendfile, jobnum.framenum.JPG, jobnum); // (check the args, we'll need to adjust for different output formats)... set SLAVESTATUS=1 while rendering, SLAVESTATUS=2 when done } if(SLAVESTATUS==2){ - tell_the_server("Completed"); fprintf(stderr, "Finished frame %d in job %d",framenum,jobnum); SLAVESTATUS=0; } if(SLAVESTATUS==0){ - tell_the_server("Idle"); + tell_the_server(DISTREN_REQUEST_DONEFRAME); fprintf(stderr, "Idle. No frames to render."); } while(SLAVESTATUS==1){ - tell_the_server("Rendering"); + tell_the_server(DISTREN_REQUEST_PROGRESS); fprintf(stderr, "Rendering frame %d in job %d...",framenum,jobnum); delay(1000); // or not... this should be more event-driven, but should still give a heartbeat to the server }