diff --git a/src/server/slave.c b/src/server/slave.c --- a/src/server/slave.c +++ b/src/server/slave.c @@ -135,7 +135,7 @@ struct distrenjob *myjob; // Structure t if(gotframe ==1) { /* @TODO: fix these remoteio_read's */ - jobnum = remotio_read(jobnum); // Set jobnum from remoteio (we could use info from struct, but we need this info to download the xmlfile) + 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 char *tarcmd; @@ -162,14 +162,21 @@ if(gotframe ==1) int fstatus = stat(pathtoJobfile, &buffer); if(fstatus != -1){ fprintf(stderr, "Using cached job file...\n"); - curlget(urltoTar, pathtoTar); // Downloads the Tar @TODO: add a progressbar + + // Downloads the Tar, with an error catcher. @TODO: add a progressbar + if( curlget(urltoTar, pathtoTar) == 0){ + fprintf(stderr, "File downloaded without errors\n"); + } + else{ + fprintf(stderr, "Download tar from server failed. Either the server is down, or the job hosting system is screwed up.\nContact admin@protofusion.org and include this message.\nGoodbye. Better luck next time.\n"); + } } _distren_asprintf(&outdir, "/tmp/distren/job%d", jobnum); /*< @todo free() */ mkdir("/tmp/distren", 0750); /* @TODO: This is a tad unix-specific... */ mkdir(outdir, 0750); - _distren_asprintf(&tarcmd, "tar -xvf \"%s\" -C \"%s\"", pathtoTar, outdir); + _distren_asprintf(&tarcmd, "tar -xvf \"%s\" -C \"%s\"", pathtoTar, outdir); /* @TODO: Make this portable. Libtar or something? */ system(tarcmd); free(tarcmd); @@ -184,7 +191,7 @@ if(gotframe ==1) } /* Variable-fillers which require XML */ - outputExt = myjob.outputFormat; + outputExt = myjob.outputFormat; /* @TODO: FIXME! */ _distren_asprintf(&pathtoOutput, "%s/job%d/output/frame%d.%s", datadir, jobnum, framenum, outputExt ); // Prepares the path to the jobfile