Changeset - f31a1535a11a
[Not reviewed]
default
0 1 0
ethanzonca - 16 years ago 2009-10-10 17:12:35

Formatting fixes, and a few code fixes
1 file changed with 7 insertions and 9 deletions:
0 comments (0 inline, 0 general)
src/server/slave.c
Show inline comments
 
@@ -18,7 +18,6 @@
 

	
 
 */
 

	
 
// Provides DISTREN_REQUEST* which is in reality, DISTREN_SEND(signal) in the minds of your average joe
 
#include "protocol.h"
 
#include "options.h" // Confuse, etc.
 
#include "slavefuncs.h" // Slave functions
 
@@ -28,11 +27,9 @@
 
#include <string.h>
 
#include <stdio.h>
 
#include <unistd.h>
 
#include <sys/stat.h> /*< mkdir() */
 
#include <sys/stat.h>
 
#include <stdlib.h>
 

	
 
int slavestatus = 0; // Ugh global vars
 

	
 
int main(int argc, char *argv[])
 
{
 

	
 
@@ -45,8 +42,8 @@ for(counter=0; counter<argc; counter++){
 
		return 2;
 
	}
 
}
 
	if(argc>1
 
		&& (strcmp("-c", argv[1]) == 0))
 

	
 
if(argc>1 && (strcmp("-c", argv[1]) == 0))
 
	{
 
		char *username;
 
		char *email;
 
@@ -65,13 +62,15 @@ for(counter=0; counter<argc; counter++){
 
			fprintf(stderr, "I want to see an '@' in your email address!\n%s may be good enough for you, but I need more!\n", email);
 
			return 235;
 
		}
 
		if( register_user(username, email) == 1){
 
    if( register_user(username, email) == 1)
 
      {
 
		  // register_user generates a key, too */
 
                  curlpost(SYSCONFDIR "/distren.id_rsa","http://protofusion.org/distren/keys");
 
		  fprintf(stderr,"Registration successful. You may now invoke distrenslave with no arguments.\n");
 
		  return 0;
 
		}
 
		else{
 
    else
 
      {
 
			fprintf(stderr,"Please try again! :D\n");
 
			return 0;
 
		}
 
@@ -164,7 +163,6 @@ 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/tmp/", 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
0 comments (0 inline, 0 general)