Changeset - ec90f545efc5
[Not reviewed]
default
0 2 0
Nathan Brink (binki) - 15 years ago 2010-10-09 11:25:13
ohnobinki@ohnopublishing.net
Fix random warnings.
2 files changed with 10 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/server/distrenjob.c
Show inline comments
 
@@ -222,12 +222,17 @@ int distrenjob_unserialize(struct distre
 
  */
 
  xmlnode = xml_quickxpath(xmlxpathcontext, (xmlChar *)"/job/stats");
 
  dj->total_render_time = 0;
 
  xmlchar = xmlGetProp(xmlnode, (xmlChar *)"total_render_time");
 
  if(xmlchar)
 
    {
 
      /*
 
       * even though GCC says this is implicitly declared, POSIX
 
       * requires that time.h declare this function. Thus, we don't
 
       * have to worry about the warning.
 
       */
 
      if(strptime((char *)xmlchar, "%D %T", &tm))
 
	dj->total_render_time = mktime(&tm);
 
      xmlFree(xmlchar);
 
    }
 

	
 
  xmlnode = xml_quickxpath(xmlxpathcontext, (xmlChar *)"/job/watchdog");
src/server/slave.c
Show inline comments
 
@@ -231,12 +231,14 @@ int main(int argc, char *argv[])
 
    fprintf(stderr, "Running..");
 

	
 

	
 
  // Main loop
 
  while(!slave_state.quit)
 
    {
 
      outputExt = NULL;
 

	
 
      multiio_poll(multiio, 15000);
 

	
 
      if(slave_state.quit)
 
	break;
 

	
 
    // request work
 
@@ -248,12 +250,13 @@ int main(int argc, char *argv[])
 
      {
 
        fprintf(stderr,"Got work from server...\n");
 
        /* @TODO: Add remotio hooks */
 
        // jobnum = remoteio_read(jobnum); /* Set jobnum from remoteio (we could use info from struct, but we need this info to download the xmlfile */
 
        // framenum = remoteio_read(jobnum); /* Set framenum from remoteio */
 
        // outputExt = remotio)read(outputExt); /* Set output extension from remotio */
 
	outputExt = strdup("jpg");	
 

	
 
        if(DEBUG)
 
          fprintf(stderr, "Preparing to render frame %d in job %d\n", framenum, jobnum);
 

	
 
        prepareJobPaths(jobnum, framenum, outputExt, datadir, &urltoTar, &pathtoTar,&pathtoTardir,&pathtoJob, &pathtoJobfile, &urltoJobfile, &urltoOutput, &pathtoOutput, &pathtoRenderOutput, &pathtoOutdir);
 

	
 
@@ -360,12 +363,14 @@ int main(int argc, char *argv[])
 
      {
 
        // Note: individual frames are already deleted after uploading,
 
        // except for ones that couldn't be uploaded
 
        delete_jobdata(jobnum, datadir);
 
      }
 

	
 
    free(outputExt);
 

	
 
    sleep(5); // Poll 5 seconds. @TODO: Remove all polling
 
  }
 

	
 
  fprintf(stderr, "Quitting...\n");
 

	
 
  free(my_cfg);
0 comments (0 inline, 0 general)