IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 13, 2005, 9:37:58 PM (21 years ago)
Author:
eugene
Message:

pcontrol dev : hosts + jobs running

File:
1 edited

Legend:

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

    r3204 r3212  
    3737int PutJob (Job *job, int StackID, int where) {
    3838
    39   int status;
     39  int stat;
    4040  Stack *stack;
    4141
     
    4646  job[0].state = StackID;
    4747  job[0].stack = StackID;
    48   status = PutStack (stack, where, job);
    49   return (status);
     48  stat = PutStack (stack, where, job);
     49  /* status (0, NULL); */
     50  return (stat);
    5051}
    5152 
     
    7273
    7374  for (i = 0; i < stack[0].Nobject; i++) {
    74     job = (Job *) stack[0].object;
     75    job = (Job *) stack[0].object[i];
    7576    if (job[0].JobID == JobID) {
    7677      return (i);
     
    163164
    164165void LinkJobAndHost (Job *job, Host *host) {
     166  int N;
     167
    165168  job[0].host = host;
    166169  host[0].job = job;
     170
     171# if (0)
     172  /*** need to pop host off of correct stack XXX ***/
     173  N = FindHost (host[0].HostID, host[0].stack);
     174  if (N < 0) {
     175    fprintf (stderr, "programming error: host is not found in current stack\n");
     176    exit (2);
     177  }
     178  host = GetHost (host[0].stack, N);
     179# endif
     180
     181  /*** need to pop job off of correct stack XXX ***/
     182  N = FindJob (job[0].JobID, job[0].stack);
     183  if (N < 0) {
     184    fprintf (stderr, "programming error: job is not found in current stack\n");
     185    exit (2);
     186  }
     187  job = GetJob (job[0].stack, N);
     188
     189  /*** this is fairly crazy : the only reason this works is cause I
     190       get the same host ptr here and in CheckIdleHost
     191  ***/
    167192}
Note: See TracChangeset for help on using the changeset viewer.