IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 5, 2005, 9:53:49 AM (21 years ago)
Author:
eugene
Message:

fixed some memory leaks, pushed extra init functions into lib inits

File:
1 edited

Legend:

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

    r4706 r4714  
    3939  for (i = 0; i < Njobs; i++) {
    4040    if (jobs[i][0].JobID == JobID) {
     41      return (jobs[i]);
     42    }
     43  }
     44  return (NULL);
     45
     46
     47/* return job with given controller Job ID */
     48Job *FindControllerJob (int JobID) {
     49
     50  int i;
     51
     52  /* return job with matching JobID */
     53  for (i = 0; i < Njobs; i++) {
     54    if (jobs[i][0].mode == JOB_LOCAL) continue;
     55    if (jobs[i][0].pid  == JobID) {
    4156      return (jobs[i]);
    4257    }
     
    96111     need to have matched entries to these quantites in the job structure */
    97112
     113  InitIOBuffer (&job[0].stdout, 0x100);
     114  InitIOBuffer (&job[0].stderr, 0x100);
     115
    98116  jobs[Njobs] = job;
    99117  Njobs ++;
     
    117135  }
    118136  free (job[0].argv);
     137
     138  FreeIOBuffer (&job[0].stdout);
     139  FreeIOBuffer (&job[0].stderr);
     140  free (job);
    119141  return;
    120142}
     
    161183  gettimeofday (&job[0].start, (void *) NULL);
    162184  job[0].last = job[0].start;
    163  
     185  job[0].state = JOB_PENDING;
    164186  return (TRUE);
    165187}
Note: See TracChangeset for help on using the changeset viewer.