Changeset - afc21acbe5ef
[Not reviewed]
default
0 1 0
Ethan Zonca (ethanzonca) - 16 years ago 2010-02-09 19:12:13
e@ethanzonca.com
Commenting, more cleanup
1 file changed with 14 insertions and 11 deletions:
0 comments (0 inline, 0 general)
src/server/distrend.c
Show inline comments
 
@@ -74,10 +74,9 @@ struct general_info
 
};
 

	
 

	
 

	
 
/***********************************
 
/* *********************************************
 
  Function Prototypes
 
 *********************************** */
 
   ********************************************* */
 

	
 
/* ************General Functions************* */
 
int xml_dump();
 
@@ -117,16 +116,13 @@ int interactiveTest(int test, struct gen
 
int job_getserialfilename(char **filename, struct general_info *geninfo, unsigned int jobnum, int createdir);
 
int distren_mkdir_recurse(char *dirname);
 

	
 
/* ************************** Main ************************* */
 

	
 
/* **************** Main ********************* */
 
int main(int argc, char *argv[])
 
{
 

	
 
  /* Parse arguments */
 
  int counter;
 
  int test = 0; /*< Interactive mode if 1 */
 
  struct general_info general_info;
 
  int cont;
 
  struct distrend_clientset *clients;
 

	
 
  enum clientstatus
 
@@ -152,7 +148,7 @@ int main(int argc, char *argv[])
 
		  test=1;
 
      }
 
    }
 
  cont = 1;
 

	
 

	
 
  if(distrend_do_config(argc, argv, &general_info.config))
 
    return 1;
 
@@ -171,11 +167,12 @@ int main(int argc, char *argv[])
 
  prepare_distrenjob(&general_info, 1, "awesome", "LordOfWar", 8, 1, 100, 640, 480);
 
  prepare_distrenjob(&general_info, 1, "hamburger", "ohnobinki", 3, 1, 50, 1280, 720);
 

	
 
 // Execute test function
 
  /** Execute test function */
 
 interactiveTest(test, general_info);
 

	
 
  distrend_listen(general_info.config, &clients);
 
  /* This is called the "main loop" */
 

	
 
  /* Main Loop */
 
  while(!general_info.config->die)
 
    {
 
      int clientsays = 0; /*< temporary example variable, will be replaced when we can handle messages */
 
@@ -185,7 +182,6 @@ int main(int argc, char *argv[])
 
      /* Make the following code more event-driven */
 
      frame_watchdog(&general_info.head);
 

	
 

	
 
      struct frameset *frame;
 
      struct distrenjob *job;
 

	
 
@@ -1147,6 +1143,8 @@ int reCreateQueueFromXML(struct general_
 
}
 

	
 
/* ************************** Test Functions ************************* */
 

	
 
/** Prints info about frames in a frameset */
 
int printFrameInfo(struct frameset *frame)
 
{
 
  char *status;
 
@@ -1174,6 +1172,7 @@ int printFrameInfo(struct frameset *fram
 
  return 0;
 
}
 

	
 
/** Prints information about all frames in a job */
 
int printJob(struct distrenjob *job)
 
{
 
  int counter;
 
@@ -1186,6 +1185,7 @@ int printJob(struct distrenjob *job)
 
  return 1;
 
}
 

	
 
/** Prints information about a job */
 
int printJobInfo(struct distrenjob *job)
 
{
 
  fprintf(stderr, "type: %d\n", job->type);
 
@@ -1203,6 +1203,7 @@ int printJobInfo(struct distrenjob *job)
 
  return 1;
 
}
 

	
 
/** Print all jobnums in the queue */
 
int printAllJobnums(struct distrenjob *head)
 
{
 
  struct distrenjob *current_job;
 
@@ -1221,6 +1222,7 @@ int printAllJobnums(struct distrenjob *h
 
  return 1;
 
}
 

	
 
/** Interactive test for the queuing system */
 
int interactiveTest(int test, struct general_info general_info){
 
  int command;
 
  jobnum_t jobnum;
 
@@ -1337,6 +1339,7 @@ int job_getserialfilename(char **filenam
 
  return 0;
 
}
 

	
 
/** Creates directories recursively */
 
int distren_mkdir_recurse(char *dirname)
 
{
 
  size_t counter;
0 comments (0 inline, 0 general)