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.*/