Changeset - 7d6ab92dff30
[Not reviewed]
default
0 1 0
Ethan Zonca (ethanzonca) - 15 years ago 2010-09-13 20:08:02
e@ethanzonca.com
commit for binki
1 file changed with 11 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/server/slavefuncs.c
Show inline comments
 
@@ -43,20 +43,27 @@
 
#include <sys/stat.h>
 
#include <fcntl.h>
 

	
 
#include <time.h>
 

	
 
// Function debug
 
#define DEBUG 0
 
#define DEBUG 1
 

	
 

	
 
/*
 
void stringToUpper(char *string){
 
  while(*string != '\0') {
 
    *string = toupper((unsigned char)*string);
 
  }
 
}
 
*/
 

	
 
void stringToUpper(char *buffer){
 
    for(; *buffer; buffer ++)
 
      *buffer = toupper(*buffer);
 
}
 

	
 

	
 
/**
 
   Grabs the xml DOM node reached by an XPath.
 

	
 
   @param path an XPath that lead to DOM node
 
   @return the first node associated with the path or NULL if there is no match
 
@@ -715,12 +722,14 @@ int _web_getwork(int slavekey, char *sla
 
      *yres = atoi(tmp);
 

	
 
      tmp = strtok (NULL, ",");
 
      if(tmp == NULL)
 
        return 0; // no work
 
      outputext = tmp;
 
      if(DEBUG)
 
        fprintf(stderr,"GETWORK Debug output - Job: %d | Frame: %d | Xres: %d | Yres: %d | Outformat: %s\n", *jobnum, *framenum, *xres, *yres, outputext);
 

	
 
      // @FIXME: Setting outputext and serverversion = temp; will this cause issues as these are pointers to parts of the original temp var?
 

	
 
      // @TODO: This should be called every time, not just on fail.
 
      if(strcmp(PACKAGE_VERSION,serverversion)){
 
        fprintf(stderr,"Your distren package is out of date! Please acquire a newer version. (%s local vs %s remote)\n", PACKAGE_VERSION, serverversion);
0 comments (0 inline, 0 general)