diff --git a/src/server/simpleslave.c b/src/server/simpleslave.c --- a/src/server/simpleslave.c +++ b/src/server/simpleslave.c @@ -111,9 +111,13 @@ int main(int argc, char *argv[]) char *pathtoTar; /* Full path to the location of the job#.tgz */ char *pathtoTardir; + // Temporary for uncomressed testing + char *urltoJobfile; + char *urltoOutput; /* Full URL where output is posted */ char *pathtoOutput; /* Full path to the output (rendered) file */ char *pathtoOutdir; /* Full path to output directory */ + char *pathtoRenderOutput; /* Contains blender framenum placeholder */ char *pathtoJob; /* Path to job data folder */ char *pathtoJobfile; /* Full path to the job's main file */ @@ -141,19 +145,23 @@ int main(int argc, char *argv[]) fprintf(stderr, "Preparing to render frame %d in job %d\n", framenum, jobnum); - prepareJobPaths(jobnum, framenum, outputExt, datadir, &urltoTar, &pathtoTar, &pathtoTardir, &pathtoJob, &pathtoJobfile, &urltoOutput, &pathtoOutput, &pathtoOutdir); + prepareJobPaths(jobnum, framenum, outputExt, datadir, &urltoTar, &pathtoTar, &pathtoTardir, &pathtoJob, &pathtoJobfile, &urltoJobfile, &urltoOutput, &pathtoOutput, &pathtoRenderOutput, &pathtoOutdir); //free(outputExt); mkdir(pathtoTardir, 0700); - int dlret = downloadTar(urltoTar, pathtoTar); + // int dlret = downloadTar(urltoTar, pathtoTar); + int dlret = downloadTar(urltoJobfile, pathtoJobfile); if(dlret == 0) - fprintf(stderr,"Got data tarball\n"); + // fprintf(stderr,"Got data tarball\n"); + fprintf(stderr,"Got uncompressed data!\n"); 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); + fprintf(stderr,"Using existing uncompressed data %s...\n", pathtoJobfile); + //fprintf(stderr,"Using existing tarball %s...\n", pathtoTar); + /* // Commented for decompression struct stat jbuffer; int jstatus = stat(pathtoJobfile, &jbuffer); if(jstatus == -1){ @@ -165,7 +173,7 @@ int main(int argc, char *argv[]) return 1; } } - + */ /* ignore return because directory may exist already */ fprintf(stderr,"Creating output directory %s\n", pathtoOutdir); @@ -177,7 +185,7 @@ int main(int argc, char *argv[]) fprintf(stderr,"Executing blender on file %s\n", pathtoJobfile); fprintf(stderr,"Directing output to file %s\n", pathtoOutput); - if(exec_blender(pathtoJobfile, pathtoOutput, framenum)) + if(exec_blender(pathtoJobfile, pathtoRenderOutput, 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 @@ -188,7 +196,7 @@ 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"); + fprintf(stderr,"*** %s doesn't exist! Scene may not have camera, or your blender installation is not working.\n", pathtoOutput); _web_resetframe(slavekey, password, jobnum, framenum); // Unassign the frame on the server so other slaves can render it return 1; }