Changeset - 7c98a38ebf04
[Not reviewed]
default
0 1 0
LordOfWar - 16 years ago 2009-10-01 05:03:47

fixed simple error in main()'s user interface where it would exit the user interface when you chose to print all the jobnums in the queue
1 file changed with 3 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/server/distrend.c
Show inline comments
 
@@ -566,25 +566,25 @@ int main(int argc, char *argv[])
 
  while(1)
 
  {
 
    printf("1-->print all frames in a job");
 
    printf("2-->examine certain job");
 
    printf("3-->get a frame to render");
 
    printf("4-->add a job");
 
    printf("5-->delete a job");
 
    printf("6-->print jobnums in queue");
 
    printf("7-->exit menu");
 

	
 
    scanf("%d", &command);
 

	
 
    if(command == 6)
 
    if(command == 7)
 
      break;
 

	
 
    switch(command)
 
    {
 
    case 1:
 
      printf("job number:");
 
      scanf("%d", &jobnum);
 
      printJob(distrenjob_get(&head, jobnum));
 
      break;
 
    case 2:
 
      printf("job number:");
 
      scanf("%d", &jobnum);
 
@@ -604,24 +604,26 @@ int main(int argc, char *argv[])
 
      printf("start frame");              scanf("%d", &end_frame);
 
      printf("end frame");                scanf("%d", &start_frame);
 
      prepare_distrenjob(&head, type, name, submitter, email, priority, start_frame, end_frame);
 
      break;
 
    case 5:
 
      printf("job number:");
 
      scanf("%d", &jobnum);
 
      distrenjob_remove(&head, distrenjob_get(&head, jobnum));
 
      break;
 
    case 6:
 
      printAllJobnums(&head);
 
      break;
 
    default:
 
      printf("invalid input");
 
    }
 
  }
 

	
 
  distrend_listen(&listenset, config);
 
  /* This is called the "main loop" */
 
  while(cont)
 
    {
 
      struct distren_action *action;
 
      int clientsays = 0; /*< temporary example variable, will be replaced when we can handle messages */
 

	
 
      distrend_accept(&action);
 
      cont = distrend_do(action);
0 comments (0 inline, 0 general)