# HG changeset patch # User ethanzonca # Date 2009-10-10 17:54:42 # Node ID 2e6b26cb909da5080723118cb2776e0d3e781705 # Parent c8caf99f43b5975e232f942c1e8745af9fc6a5d9 Minor updates diff --git a/src/server/slave.c b/src/server/slave.c --- a/src/server/slave.c +++ b/src/server/slave.c @@ -130,6 +130,10 @@ char *pathtoXml; // Full path to the char *pathtoOutput; // Full path to the output (rendered) file char *outputExt; // Output Extension (e.g., JPG) +char *tarcmd; // Command to run for tar. Migrate to libtar sometime +char *outdir; // Output Directory for tar +char *jobdatapath; // Path to job data + struct distrenjob *myjob; // Structure to hold data gathered from the XML file /* If the server says that every frame for jobnum is finished */ @@ -142,15 +146,11 @@ if( 1 == 0) if(gotframe ==1) { /* @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) + // jobnum = remoteio_read(jobnum); // Set jobnum from remoteio (we could use info from struct, but we need this info to download the xmlfile jobnum = 0; //framenum = remoteio_read(jobnum); // Set framenum from remoteio framenum = 0; - char *tarcmd; - char *outdir; - char *jobdatapath; - fprintf(stderr, "Received %d in job %d, preparing to render...\n",framenum,jobnum); /** @@ -182,7 +182,7 @@ if(gotframe ==1) fprintf(stderr, "Using cached job file...\n"); } - _distren_asprintf(&outdir, "/tmp/distren/job%d", jobnum); /*< @todo free() */ + _distren_asprintf(&outdir, "/tmp/distren/job%d", jobnum); /*< @TODO: free() */ mkdir("/tmp/distren", 0750); /* @TODO: Make this less *nix-specific */ mkdir(outdir, 0750); diff --git a/src/server/slavefuncs.c b/src/server/slavefuncs.c --- a/src/server/slavefuncs.c +++ b/src/server/slavefuncs.c @@ -135,7 +135,7 @@ size_t curl_writetodisk(void *ptr, size_ return fwrite(ptr, size, nmemb, stream); } -/** Helper function for cURL's progressbar */ +/** Helper function for cURL's progress display */ int curl_progress( char *Bar,double t,double d,double ultotal,double ulnow) { fprintf(stderr,"Downloading... %f%% complete\r",d/t*100); @@ -145,7 +145,7 @@ return 0; /** Retrieves a URL with cURL and saves it to disk */ int curlget(char *url, char *out){ - double *Bar; // Stores cURL progressbar info + double *Bar; // Stores cURL progress display info CURL *curl; CURLcode res; FILE *outfile;