IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 15, 2018, 8:56:30 AM (8 years ago)
Author:
eugene
Message:

change rule for JobID: continuously increment (abort at 231); use IDtype

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/opihi/pantasks/JobOps.c

    r38559 r40424  
    4141
    4242/* return job with given ID */
    43 Job *FindJob (int JobID) {
     43Job *FindJob (IDtype JobID) {
    4444
    4545  int i;
     
    5555
    5656/* return job with given controller Job ID */
    57 Job *FindControllerJob (int JobID) {
     57Job *FindControllerJob (IDtype JobID) {
    5858
    5959  int i;
     
    8282  gprint (GP_LOG, " Jobs in Pantasks Queue\n");
    8383  for (i = 0; i < Njobs; i++) {
    84     gprint (GP_LOG, " %4d  %6d: %-25s %10s %20s\n", Njobs, jobs[i][0].JobID, jobs[i][0].task[0].name, JobStateToString(jobs[i][0].state), jobs[i][0].argv[0]);
     84    gprint (GP_LOG, " %4d  %8d: %-25s %10s %20s\n", Njobs, jobs[i][0].JobID, jobs[i][0].task[0].name, JobStateToString(jobs[i][0].state), jobs[i][0].argv[0]);
    8585  }
    8686
     
    9797
    9898  job[0].JobID = NextJobID ();
     99
     100  // this should not happen; abort?
    99101  if (job[0].JobID < 0) {
    100102    free (job);
     
    165167  if (job == NULL) return;
    166168 
    167   FreeJobID (job[0].JobID);
    168 
    169169  for (i = 0; i < job[0].argc; i++) {
    170170    free (job[0].argv[i]);
Note: See TracChangeset for help on using the changeset viewer.