IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 18, 2009, 10:29:51 AM (17 years ago)
Author:
eugene
Message:

updated vysos branch from trunk

Location:
branches/eam_branches/20090820
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20090820

  • branches/eam_branches/20090820/Ohana/src/opihi/pcontrol/StopHosts.c

    r18098 r25873  
    6969}
    7070
    71 int StopHost (Host *host) {
     71int StopHost (Host *host, int mode) {
    7272
    7373  int       status;
    7474
    75   status = PclientCommand (host, "exit", "Goodbye", PCONTROL_RESP_STOP_HOST);
     75  switch (mode) {
     76    case PCONTROL_HOST_DOWN:
     77      status = PclientCommand (host, "exit", "Goodbye", PCONTROL_RESP_DOWN_HOST);
     78      break;
     79    case PCONTROL_HOST_OFF:
     80      status = PclientCommand (host, "exit", "Goodbye", PCONTROL_RESP_STOP_HOST);
     81      break;
     82    default:
     83      ABORT ("programming error: invalid StopHost mode");
     84  }
    7685
    7786  /* check on success of pclient command */
    7887  switch (status) {
    7988    case PCLIENT_DOWN:
    80       // XXX this is the desired result in any case, so ignore it
    81       break;
     89      PutHost (host, PCONTROL_HOST_RESP, STACK_BOTTOM);
     90      return (TRUE);
    8291
    8392    case PCLIENT_GOOD:
     
    96105
    97106  OffHost (host);
     107  HarvestHost (host[0].pid);
     108  return (TRUE);
     109}
     110
     111int DownHostResponse (Host *host) {
     112
     113  DownHost (host);
    98114  HarvestHost (host[0].pid);
    99115  return (TRUE);
     
    134150     
    135151    case 0:
    136       gprint (GP_ERR, "child did not exit??");
    137       abort ();
    138       /** put back in IDLE state? **/
     152      gprint (GP_ERR, "HarvestHost: child with connection to remote host failed to exit: may be hung");
    139153      break;
    140154
Note: See TracChangeset for help on using the changeset viewer.