diff --git a/src/server/distrend.c b/src/server/distrend.c --- a/src/server/distrend.c +++ b/src/server/distrend.c @@ -32,7 +32,7 @@ #include #include /* getopt */ #include - +#include /* ******************* Structs ************************ */ @@ -124,9 +124,11 @@ void remotio_send_to_client() { // I am futile! } + /** Fill variables after crash / shutdown from XML dumps */ int start_data(){ - if(1 == 0){ + struct stat buffer; + if(stat(SYSCONFDIR "/data.xml", &buffer) == 0){ // retrieve total_finished_jobs and total_finished_frames from xml file fprintf(stderr,"Parsing XML files and restoring previous state...\n"); return 1; @@ -137,6 +139,7 @@ int start_data(){ fprintf(stderr,"Can't find XML dump, starting up fresh.\n"); return 2; } + free(&buffer); // @TODO: Is this pointless? } /** Finish-Setter: Sets a frame to the "completed" status.*/ diff --git a/src/server/slave.c b/src/server/slave.c --- a/src/server/slave.c +++ b/src/server/slave.c @@ -130,8 +130,11 @@ char *pathtoOutput; // Full path to the char *outputExt; // Output Extension (e.g., JPG) 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 slave is getting job info... if(gotframe ==1) {