Changeset - 4b8e027a0b0c
[Not reviewed]
default
0 1 0
ethanzonca - 16 years ago 2009-10-10 18:58:20

Minor changes
1 file changed with 4 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/server/slavefuncs.c
Show inline comments
 
@@ -72,13 +72,13 @@ int software_updatecheck(char *datadir){
 
  char *engineDownloadPath;
 
  _distren_asprintf(&engineDownloadPath, "%s/engines/blender.tgz",datadir);
 

	
 
  char *pathtolocalVersion;
 
  _distren_asprintf(&pathtolocalVersion, "%s/envines/blender/version.info",datadir);
 

	
 
  curlget("http://protofusion.org/srv/version.info",  pathtoserverVersion);
 
  curlget("http://protofusion.org/distren/srv/version.info",  pathtoserverVersion);
 
  struct stat buffer;
 
  char serverVersion[5]; // Version numbers are nice and short
 
  char localVersion[5]; // Version numbers are nice and short
 

	
 

	
 
  // Read server version
 
@@ -135,19 +135,19 @@ size_t curl_writetodisk(void *ptr, size_
 
    return fwrite(ptr, size, nmemb, stream);
 
  }
 

	
 
/** 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);
 
fprintf(stderr,"Downloading: %f%% complete\r",d/t*100);
 
return 0;
 
}
 

	
 
/** Retrieves a URL with cURL and saves it to disk */
 
int curlget(char *url, char *out){
 

	
 
  fprintf(stderr,"Preparing to download %s",url);
 
  double *Bar; // Stores cURL progress display info
 
  CURL *curl;
 
  CURLcode res;
 
  FILE *outfile;
 

	
 
  curl = curl_easy_init();
 
@@ -259,13 +259,13 @@ return 0;
 

	
 
/** Registers the user on the DistRen server */
 
int register_user(char *username, char *email)
 
{
 

	
 
/* Note: this code moved here from after the useradd code, so useradd doesn't happen if there is an existing key, etc */
 

	
 
  fprintf(stderr,"Preparing to download setup key...\n");
 
  curlget("http://protofusion.org/distren/keys/setup_rsa", SYSCONFDIR "/setup_rsa"); // Grabs key to use for setup login
 

	
 
  /* puts the person's username in the conf */
 
  if(conf_replace(username) == 0){
 
    fprintf(stderr, "Failed!\n");
 
    return 0;
0 comments (0 inline, 0 general)