diff --git a/src/server/simpleslave.c b/src/server/simpleslave.c --- a/src/server/simpleslave.c +++ b/src/server/simpleslave.c @@ -147,8 +147,10 @@ int main(int argc, char *argv[]) int dlret = downloadTar(urltoTar, pathtoTar); if(dlret == 0) fprintf(stderr,"Got data tarball\n"); - else if(dlret == 3) + else if(dlret == 3){ + _web_resetframe(slavekey, password, jobnum, framenum); // Unassign the frame on the server so other slaves can render it return 0; // ouput dir doesn't exist + } else fprintf(stderr,"Using existing tarball %s...\n", pathtoTar); @@ -158,8 +160,10 @@ int main(int argc, char *argv[]) fprintf(stderr,"Main job file does not exist, extracting...\n"); // If error unpacking tarball - if(unpackJob(pathtoJob, pathtoTar)) + if(unpackJob(pathtoJob, pathtoTar)){ + _web_resetframe(slavekey, password, jobnum, framenum); // Unassign the frame on the server so other slaves can render it return 1; + } } @@ -176,6 +180,7 @@ int main(int argc, char *argv[]) if(exec_blender(pathtoJobfile, pathtoOutput, framenum)) { fprintf(stderr,"Error running Blender. Check your installation and/or your PATH.\n"); + _web_resetframe(slavekey, password, jobnum, framenum); // Unassign the frame on the server so other slaves can render it return 1; } free(pathtoJobfile); @@ -183,8 +188,8 @@ int main(int argc, char *argv[]) struct stat buffer; int fstatus = stat(pathtoOutput, &buffer); if(fstatus == -1){ - fprintf(stderr,"Frame was not rendered correctly! Scene may not have camera, or your blender installation is not working.\n"); - // @TODO: Unassign the frame on the server so other slaves can render it + fprintf(stderr,"*** Frame was not rendered correctly! Scene may not have camera, or your blender installation is not working.\n"); + _web_resetframe(slavekey, password, jobnum, framenum); // Unassign the frame on the server so other slaves can render it return 1; } else{