Changeset - 18e6f04a1092
[Not reviewed]
default
0 1 0
LordOfWar - 16 years ago 2009-10-01 00:51:50

-created printAllJobnums() functions to... print all the job numbers in the queue in the order they will be processed
-added printAllJobnums to user interface
1 file changed with 19 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/server/distrend.c
Show inline comments
 
@@ -482,12 +482,28 @@ void printJobInfo(struct distrenjob *job
 
  printf("total: %d", job->total_frames);
 
  printf("watchdog: %d", job->watchdog_forgiveness);
 
  printf("hibernate: %d", job->hibernate);
 
  printf("prev_frame: %d", job->prev_frame_index);
 
}
 

	
 
void printAllJobnums(struct distrenjob *head)
 
{
 
  struct distrenjob *current_job;
 
  int total_jobs;
 
  printf("job numbers in the order they will be processed:");
 

	
 
  total_jobs = 0;
 
  for(current_job = head; !current_job; current_job = current_job->next)
 
    {
 
      printf("%d", current_job->jobnum);
 
      total_jobs++;
 
    }
 

	
 
  printf("%d jobs in queue", total_jobs);
 
}
 

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

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

	
 
  /* Argument-parser */
 
@@ -587,15 +603,18 @@ int main(int argc, char *argv[])
 
      printf("priority");                 scanf("%d", &priority);
 
      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;
 
    }
 
  }
 

	
 
  distrend_listen(&listenset, config);
 
  /* This is called the "main loop" */
0 comments (0 inline, 0 general)