Changeset - b69c120bacd2
[Not reviewed]
default
0 1 0
ethanzonca - 16 years ago 2009-09-03 22:13:05

Fixed backwards implementation
1 file changed with 3 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/server/slave.c
Show inline comments
 
@@ -156,13 +156,15 @@ if(gotframe ==1)
 
    _distren_asprintf(&urltoOutput, "http://protofusion.org/distren/stor/job%d/output/", jobdatapath ); // Prepares the URL where output is posted
 
    _distren_asprintf(&pathtoXml, "%s/job%d/job%d.xml",datadir, jobnum ); // Prepares the path to the job's XML file
 

	
 
      // Downloads the job tar if it isn't  present. @TODO: Delete old job data
 
      struct stat buffer;
 
      int fstatus = stat(pathtoJobfile, &buffer);
 
      if(fstatus != -1){
 

	
 
      // If stat'ing the jobfile shows that the jobfile doesn't exist, we'll download it.
 
      if(fstatus == -1){
 
              // Downloads the Tar @TODO: add progress bar
 
              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");
0 comments (0 inline, 0 general)