# HG changeset patch # User LordOfWar # Date 2009-10-09 14:52:35 # Node ID 9c2a6fb89ff20423e7d0c0bee6779e6ef66af0f3 # Parent 0b46b7cc6eabed93c0a136ee994346ae6c82a3cb fixed warnings and started a new function diff --git a/src/server/distrend.c b/src/server/distrend.c --- a/src/server/distrend.c +++ b/src/server/distrend.c @@ -73,6 +73,8 @@ void distrenjob_remove(struct distrenjob struct distrenjob *distrenjob_get(struct distrenjob *head, jobnum_t jobnum); void distrenjob_enqueue(struct distrenjob *head, struct distrenjob *job); void mortition(struct distrenjob *head, struct distrenjob *job); +int reCreateQueueFromXML(struct distrenjob *head, xmlDocPtr doc, xmlNodePtr current); + /* Global Vars, eliminate these */ jobnum_t jobnum = 0; // The next job number to create in the queue @@ -510,6 +512,13 @@ int makeSlaveDataXML(struct distrenjob * return 1; } +// extracts data from the xml created by above function and creates a job from it +// it returns a pointer to the created job +void createJobFromXML(int job_number) +{ + +} + // returns 1 if successful // updates job_list.xml which lists all the jobs in the queue int updateJobListXML(struct distrenjob *head) @@ -552,7 +561,6 @@ int updateJobListXML(struct distrenjob * // and then adds the jobs to the queue, as if it were never shut down int createQueueFromXML(struct distrenjob *head) { - xmlChar *tmp; xmlDocPtr doc; // holds xml document in memory xmlNodePtr cur; // points to the current xml element node @@ -580,7 +588,7 @@ int createQueueFromXML(struct distrenjob // moves into the children elements of job_list cur = cur->xmlChildrenNode; - reCreateQueueFromXML(doc, cur); + reCreateQueueFromXML(head, doc, cur); /* scans the list of all jobs that were in queue before DistRen shutdown while(cur != NULL) {