Changeset - 7a147d9d03a8
[Not reviewed]
default
0 3 0
ethanzonca - 16 years ago 2009-09-07 01:44:58

filled out delete_jobdata a bit
3 files changed with 10 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/server/slave.c
Show inline comments
 
@@ -131,12 +131,16 @@ char *outputExt;     // Output Extension
 

	
 
int threads = sysconf(_SC_NPROCESSORS_ONLN); // Equals the number of currently online processors
 
// FOR Win32: int threads = sysinfo.dwNumberOfProcessors;
 

	
 
struct distrenjob *myjob; // Structure to hold data gathered from the XML file
 

	
 
/* If the server says that every frame for jobnum is finished */
 
if( 1 == 0){
 
delete_jobdata(jobnum);
 
}
 

	
 
// If the slave is getting job info...
 
if(gotframe ==1)
 
  {
 
    /* @TODO: fix these remoteio_read's */
 
    jobnum = remoteio_read(jobnum); // Set jobnum from remoteio (we could use info from struct, but we need this info to download the xmlfile)
src/server/slavefuncs.c
Show inline comments
 
@@ -61,13 +61,17 @@ xmlNodePtr xml_quickxpath(xmlXPathContex
 

	
 
  return toreturn;
 
}
 

	
 

	
 
/** Stub for deleting job data from the disk. @TODO: unstubify me! */
 
int delete_jobdata(int jobnum){
 
int delete_jobdata(int jobnum, char datadir){
 
  char *jobpath;
 
  _distren_asprintf(&jobpath, "%s/%d",datadir,jobnum);
 
  rmdir(jobpath);
 
  fprintf(stderr,"I just failed to remove all of your job data because I can only delete empty directories! Haha!\nPlease contact the dev team :D\n");
 
  return 0;
 
}
 

	
 
/** Stub stub stubbiness ugh @TODO: Kill me. */
 
void tell_the_server(char *stuff){
 
}
src/server/slavefuncs.h
Show inline comments
 
@@ -24,12 +24,13 @@
 

	
 
#include <libxml/xpath.h>
 
#include <stdio.h>
 

	
 
xmlNodePtr xml_quickxpath(xmlXPathContextPtr xpathctxt, xmlChar *path);
 
void tell_the_server(char *stuff);
 
int delete_jobdata(int jobnum, char datadir);
 
size_t curl_writetodisk(void *ptr, size_t size, size_t nmemb, FILE *stream);
 
int curlget(char *url, char *out);
 
int curlpost(char *filename, char *url);
 
int ssh_keygen();
 
int register_user(char *username, char *email);
 
int login_user(char *username);
0 comments (0 inline, 0 general)