Changeset - b236a45982d4
[Not reviewed]
default
0 3 0
Nathan Brink (binki) - 16 years ago 2009-09-13 16:20:45
ohnobinki@ohnopublishing.net
fixed delete_jobdata() slightly
3 files changed with 9 insertions and 7 deletions:
0 comments (0 inline, 0 general)
src/server/slave.c
Show inline comments
 
@@ -135,9 +135,10 @@ int threads = sysconf(_SC_NPROCESSORS_ON
 
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( 1 == 0)
 
  {
 
    delete_jobdata(jobnum, datadir);
 
  }
 

	
 
// If the slave is getting job info...
 
if(gotframe ==1)
src/server/slavefuncs.c
Show inline comments
 
@@ -64,11 +64,12 @@ xmlNodePtr xml_quickxpath(xmlXPathContex
 

	
 

	
 
/** Stub for deleting job data from the disk. @TODO: unstubify me! */
 
int delete_jobdata(int jobnum, char datadir){
 
int delete_jobdata(int jobnum, char *datadir)
 
{
 
  char *jobpath;
 
  _distren_asprintf(&jobpath, "%s/%d",datadir,jobnum);
 
  _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");
 
  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\tWe'd be overjoyed to know that someone was willing to try to use this in this devel/design/planning stage ;-)\n");
 
  return 0;
 
}
 

	
src/server/slavefuncs.h
Show inline comments
 
@@ -27,7 +27,7 @@
 

	
 
xmlNodePtr xml_quickxpath(xmlXPathContextPtr xpathctxt, xmlChar *path);
 
void tell_the_server(char *stuff);
 
int delete_jobdata(int jobnum, char datadir);
 
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);
0 comments (0 inline, 0 general)