diff --git a/src/server/simpleslave.c b/src/server/simpleslave.c --- a/src/server/simpleslave.c +++ b/src/server/simpleslave.c @@ -145,13 +145,14 @@ int main(int argc, char *argv[]) char *pathtoTardir; // Temporary for uncompressed testing - char *urltoJobfile; + // 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 *urltoJobfile; /* Used if we aren't using compression */ char *pathtoJob; /* Path to job data folder */ char *pathtoJobfile; /* Full path to the job's main file */ char *outputExt = "jpg"; /* Output Extension (e.g., JPG) */ @@ -196,18 +197,14 @@ int main(int argc, char *argv[]) if(haveWork) { fprintf(stderr,"Got work from server...\n"); - /* @TODO: Add remotio hooks */ - // jobnum = remoteio_read(jobnum); /* Set jobnum from remoteio (we could use info from struct, but we need this info to download the xmlfile */ - // framenum = remoteio_read(jobnum); /* Set framenum from remoteio */ - // outputExt = remotio)read(outputExt); /* Set output extension from remotio */ if(DEBUG) fprintf(stderr, "Preparing to render frame %d in job %d\n", framenum, jobnum); 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(urltoJobfile, pathtoJobfile); + int dlret = downloadTar(urltoTar, pathtoTar); + //int dlret = downloadTar(urltoJobfile, pathtoJobfile); if(dlret == 0) fprintf(stderr,"Data retrieved successfully!\n"); else if(dlret == 3){ @@ -216,10 +213,10 @@ int main(int argc, char *argv[]) } else if(DEBUG) - fprintf(stderr,"Using existing uncompressed data %s...\n", pathtoJobfile); - //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 + // Check if tar exists already struct stat jbuffer; int jstatus = stat(pathtoJobfile, &jbuffer); if(jstatus == -1){ @@ -228,10 +225,10 @@ int main(int argc, char *argv[]) // If error unpacking tarball if(unpackJob(pathtoJob, pathtoTar)){ _web_resetframe(slavekey, password, jobnum, framenum); // Unassign the frame on the server so other slaves can render it + fprintf(stderr,"Extraction failed, exiting.\n"); return 1; } } - */ /* ignore return because directory may exist already */ if(DEBUG)