Changeset - 86de9c9f23c5
[Not reviewed]
default
0 1 0
Ethan Zonca (ethanzonca) - 15 years ago 2010-09-02 23:59:18
e@ethanzonca.com
Added benchmark catcher
1 file changed with 5 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/server/slavefuncs.c
Show inline comments
 
@@ -651,24 +651,29 @@ int _web_getwork(int slavekey, char *sla
 
  struct _web_memorystruct data = _web_getrequest(url);
 
  free(url);
 

	
 
  if(!data.memory || !strcmp(data.memory,",")){
 
    fprintf(stderr,"*** No work available on server! In other news, really weird things are happening. Check it out. You shouldn't be seeing this.\n");
 
    return 0;
 
  }
 
  else if(!strcmp(data.memory, "ERROR_BADKEY")){
 
    fprintf(stderr,"*** Slave %d does not exist!\n",slavekey);
 
    free(data.memory);
 
    return 0;
 
  }
 
  else if(!strcmp(data.memory, "ERROR_NORENDERPOWER")){
 
    fprintf(stderr,"*** Render power not set! Please invoke distrensimpleslave -r to run the benchmark!\n",slavekey);
 
    free(data.memory);
 
    return 0;
 
  }
 
  // Compare to PACKAGE_VERSION
 
  else{
 
    char *tmp;
 
    char *serverversion;
 

	
 
    tmp = strtok (data.memory,",,");
 
    if(tmp != NULL){ // make sure work is available
 
      *jobnum = atoi(tmp);
 
      tmp = strtok (NULL, ",");
 
      if(tmp == NULL)
 
        return 0; // no work
 
      *framenum = atoi(tmp);
0 comments (0 inline, 0 general)