diff --git a/src/server/distrend.c b/src/server/distrend.c --- a/src/server/distrend.c +++ b/src/server/distrend.c @@ -54,6 +54,7 @@ #include "options.h" #include "blendjob.h" #include "protocol.h" +#include "slavefuncs.h" #include #include @@ -488,6 +489,20 @@ int distrend_do_config(int argc, char *a CFG_END() }; + struct blendjob *distrenjob; + + int tmp; + + xmlinit(); + /* + * test xml2distrenjob() + */ + tmp = xml2distrenjob(&distrenjob, "distrenjob.xml.example"); + if(tmp) + fprintf(stderr, "xml2distrenjob() returned %d. Try to cd to distren/doc if you want to test out the xml2distrenjob() function. (This will only fix this error if the error is due to an inability of the xml library to access distrenjob.xml.example)\n", tmp); + else + fprintf(stderr, "using email ``%s'' for user ``%s'' -- reading in XML files and pulling data from them using libxml2+XPath works!!!\n", distrenjob->email, distrenjob->submitter); + fprintf(stderr, "%s:%d running config\n", __FILE__, __LINE__); *config = malloc(sizeof(struct distrend_config)); @@ -497,6 +512,7 @@ int distrend_do_config(int argc, char *a fprintf(stderr, "using %s as datadir\n", (*config)->datadir); + xmlcleanup(); return 0; } int distrend_config_free(struct distrend_config *config)