Changeset - c95faed1b3f1
[Not reviewed]
default
0 1 0
Nathan Brink (binki) - 16 years ago 2009-08-03 23:37:14
ohnobinki@ohnopublishing.net
fixed mkdir() calls
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/server/slave.c
Show inline comments
 
@@ -148,26 +148,26 @@ if(gotframe ==1)
 
    _distren_asprintf(&jobdatapath, "job%d", jobnum);
 
    _distren_asprintf(&urltoTar, "http://protofusion.org/distren/stor/job%d/job%d.tar.gz",jobnum); // Prepares URL to download from
 
    _distren_asprintf(&pathtoTar, "%s/stor/jobdata/job%d.tar.gz", datadir, jobnum); // Prepares destination to save to
 

	
 
    _distren_asprintf(&pathtoJobfile, "%s/%s/job.blend", datadir, jobdatapath ); // Prepares the path to the jobfile
 
    _distren_asprintf(&urltoOutput, "http://protofusion.org/distren/stor/job%d/output/", jobdatapath ); // Prepares the URL where output is posted
 
    _distren_asprintf(&pathtoOutput, "%s/job%d/output/frame%d.%s", datadir, jobnum, framenum, outputext ); // Prepares the path to the jobfile
 

	
 
    //  Download the data
 
    curlget(urltoTar, pathtoTar); // Downloads the Tar @TODO: add a progressbar
 

	
 
    _distren_asprintf(&outdir, "/tmp/distren/job%d", jobnum); /*< @todo free() */
 
    mkdir("/tmp/distren");
 
    mkdir(outdir);
 
    mkdir("/tmp/distren", 0750);
 
    mkdir(outdir, 0750);
 

	
 
    _distren_asprintf(&tarcmd, "tar -xvf \"%s\" -C \"%s\"", pathtoTar, outdir);
 
    system(tarcmd);
 
    free(tarcmd);
 

	
 
    // exec_blender(blendjob, pathtoJobfile, pathtoOutput, framenum); // So this should grab data from the struct? I have no idea. @TODO: Ohnobinki, we should clear this up.
 

	
 
    // Consider placing the following in the exec_blender() function
 
    while(busy == 1){
 
      tell_the_server(DISTREN_REQUEST_PROGRESS);
 
        fprintf(stderr, "Rendering frame %d in job %d...",framenum,jobnum);
 
        sleep(5); // or not... this should be more event-driven, but should still give a heartbeat to the server
0 comments (0 inline, 0 general)