Changeset - 5aed1b4859a6
[Not reviewed]
default
0 1 0
ethanzonca - 16 years ago 2009-09-29 21:46:34

meh, need some refining in optgrabber
1 file changed with 8 insertions and 4 deletions:
0 comments (0 inline, 0 general)
src/server/distrend.c
Show inline comments
 
@@ -135,13 +135,13 @@ int start_data()
 
    fprintf(stderr,"Parsing XML files and restoring previous state...\n");
 
    return 1;
 
  }
 
  else{
 
    general_info.total_finished_jobs = 0;
 
    general_info.total_frames_rendered = 0;
 
    fprintf(stderr,"Can't find XML dump, starting up fresh.\n");
 
    fprintf(stderr,"Couldn't find XML dump, starting up fresh.\n");
 
    return 2;
 
  }
 
}
 

	
 
/** Finish-Setter: Sets a frame to the "completed" status.*/
 
void finish_frame(struct distrenjob *head, struct distrenjob *distrenjob, int frame)
 
@@ -411,13 +411,13 @@ int distrend_do_config(int argc, char *a
 
  xmlinit();
 
  /*
 
   * test xml2distrenjob()
 
   */
 
  tmp = xml2distrenjob(&distrenjob, "distrenjob.xml.example");
 
  if(tmp)
 
    fprintf(stderr, "xml2distrenjob() returned %d. Try to cd to distren/doc if you want to test out the xml2distrenjob() function. (This will only fix this error if the error is due to an inability of the xml library to access distrenjob.xml.example)\n", tmp);
 
    fprintf(stderr, "xml2distrenjob() returned %d. Try to cd to distren/doc if you want to test out the xml2distrenjob() function. (This will only fix this error if the error is due to an inability of the xml library to access distrenjob.xml.example)\n\n", tmp);
 
  else
 
    fprintf(stderr, "using email ``%s'' for user ``%s'' -- reading in XML files and pulling data from them using libxml2+XPath works!!!\n", distrenjob->email, distrenjob->submitter);
 

	
 
  fprintf(stderr, "%s:%d running config\n", __FILE__, __LINE__);
 

	
 
  *config = malloc(sizeof(struct distrend_config));
 
@@ -491,28 +491,32 @@ void printJobInfo(struct distrenjob *hea
 
int main(int argc, char *argv[])
 
{
 

	
 
  /* Argument-parser */
 
  int counter = 0;
 
  int test = 0; // Have some fun if-ness that does fun stuff when this is 1
 
  int die = 0;
 

	
 
  for(counter=0; counter<argc; counter++){
 
         if(strcmp(argv[counter], "-h") == 0) {
 
           fprintf(stderr, "Usage: distrend [option] \nStarts the distrend server\n\t-h\tshow this help\n\t-t\tlaunches queue testing interface \n");
 
           return 2;
 
          }
 

	
 
          else if(strcmp(argv[counter], "-t") == 0) {
 
            fprintf(stderr, "Entering into test mode...\n\n");
 
            test=1;
 
          }
 
          else{
 
            fprintf(stderr, "Please enter some compatible args (see -h), or invoke without any.\n\n");
 
            fprintf(stderr, "Please enter some compatible args (see -h), or invoke with no args.\n\n");
 
            die=1;
 
          }
 
  }
 

	
 
  if(die==1){
 
    return 3;
 
  }
 

	
 
  struct distrenjob head;
 
  head.priority = 0; // make head have the highest priority
 

	
 
  int cont;
 
  struct distrend_listenset *listenset;
0 comments (0 inline, 0 general)