Changeset - b93f715caacb
[Not reviewed]
default
0 1 0
LordOfWar - 16 years ago 2009-10-09 16:44:09

implemented makeJobDataXML() and updateJobListXML()
1 file changed with 9 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/server/distrend.c
Show inline comments
 
@@ -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 makeJobDataXML(struct distrenjob *job);
 
int updateJobListXML(struct distrenjob *head);
 
int reCreateQueueFromXML(struct distrenjob *head, xmlDocPtr doc, xmlNodePtr current);
 

	
 

	
 
@@ -192,6 +194,7 @@ void mortition(struct distrenjob *head, 
 
      distrenjob_remove(head, job);
 
      distrenjob_free(&job);
 
      general_info.jobs_in_queue--;
 
      updateJobListXML(head);
 
    }
 
  else{
 
    job->prev_frame_index = 0; // if the job isn't done, have frame_finder() start from the first frame, allowing it to see the frames that are now unassigned
 
@@ -252,7 +255,9 @@ void prepare_distrenjob(struct distrenjo
 
  }
 

	
 
  /* add job to queue */
 
  makeJobDataXML(distrenjob);
 
  distrenjob_enqueue(head, distrenjob);
 
  updateJobListXML(head);
 

	
 
  general_info.jobs_in_queue++;
 
}
 
@@ -305,6 +310,7 @@ void change_job_priority(struct distrenj
 
      prev_job = current_job;
 
    }
 
  }
 
  updateJobListXML(head);
 
}
 

	
 
/**
 
@@ -477,7 +483,8 @@ int distrend_config_free(struct distrend
 
/* ************************** XML Functions ************************* */
 

	
 
// returns 1 on successful completion of xml file
 
int makeSlaveDataXML(struct distrenjob *job)
 
// creates the xml file that slaves read from, and is used to restart distren
 
int makeJobDataXML(struct distrenjob *job)
 
{
 
  xmlTextWriterPtr writer;
 
  char *tmp; // temporarily holds strings to be given to the xml writer
 
@@ -536,6 +543,7 @@ struct distrenjob *createJobFromXML(int 
 
  distrenjob->width = atoi((char*)xmlGetProp(cur, (xmlChar*)"width"));
 
  distrenjob->height = atoi((char*)xmlGetProp(cur, (xmlChar*)"number"));
 

	
 
  restoreJobState(distrenjob);
 
  return distrenjob;
 
}
 

	
0 comments (0 inline, 0 general)