IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 26412


Ignore:
Timestamp:
Dec 15, 2009, 4:14:29 PM (16 years ago)
Author:
eugene
Message:

fixed a bug

File:
1 edited

Legend:

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

    r26411 r26412  
    9494  // machine = host[0].machine;
    9595  machine = FindMachineByName (host[0].hostname);
     96  if (machine == NULL) return (FALSE);
    9697
    9798  machine[0].Nhosts --;
     
    110111  // find machine matching the real host name
    111112  machine = FindMachineByName (host[0].hostname); // Can this fail?
    112   ASSERT (machine, "cannot find machine associated with host") 
    113     machine[0].NjobsRealhost ++;
    114 
     113  ASSERT (machine, "cannot find machine associated with host");
     114  machine[0].NjobsRealhost ++;
     115 
    115116  // skip jobs that do not have a targeted host
    116117  if (job[0].hostname == NULL) {
     
    125126  // find machine matching the want host name (these are running on an unwanted host)
    126127  machine = FindMachineByName (job[0].hostname); // Can this fail?
    127   ASSERT (machine, "cannot find machine associated with host")
    128     machine[0].NjobsWanthost ++;
     128  if (machine == NULL) return (TRUE);
     129  machine[0].NjobsWanthost ++;
    129130 
    130131  return (TRUE);
     
    137138  // find machine matching the real host name
    138139  machine = FindMachineByName (host[0].hostname); // Can this fail?
    139   ASSERT (machine, "cannot find machine associated with host") 
    140     machine[0].NjobsRealhost --;
     140  ASSERT (machine, "cannot find machine associated with host");
     141  machine[0].NjobsRealhost --;
    141142
    142143  // skip jobs that do not have a targeted host
     
    152153  // find machine matching the want host name
    153154  machine = FindMachineByName (job[0].hostname); // Can this fail?
    154   ASSERT (machine, "cannot find machine associated with host")
    155     machine[0].NjobsWanthost --;
     155  if (machine == NULL) return (TRUE);
     156  machine[0].NjobsWanthost --;
    156157 
    157158  return (TRUE);
     
    177178
    178179  machine = FindMachineByName (job[0].hostname);
     180  if (machine == NULL) return (TRUE);
    179181  // fprintf (stderr, "wanthost: %s, Ntotal: %d, Nmax: %d\n", job[0].hostname, machine[0].NjobsWanthost + machine[0].NjobsRealhost, machine[0].Nhosts + MAX_UNWANTED_HOST_JOBS);
    180182  // if (machine[0].NjobsWanthost + machine[0].NjobsRealhost >= machine[0].Nhosts + MAX_UNWANTED_HOST_JOBS) {
Note: See TracChangeset for help on using the changeset viewer.