- Timestamp:
- Oct 18, 2009, 10:29:51 AM (17 years ago)
- Location:
- branches/eam_branches/20090820
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
Ohana/src/opihi/pcontrol/StopHosts.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/20090820
- Property svn:mergeinfo changed
/trunk merged: 25871-25872
- Property svn:mergeinfo changed
-
branches/eam_branches/20090820/Ohana/src/opihi/pcontrol/StopHosts.c
r18098 r25873 69 69 } 70 70 71 int StopHost (Host *host ) {71 int StopHost (Host *host, int mode) { 72 72 73 73 int status; 74 74 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 } 76 85 77 86 /* check on success of pclient command */ 78 87 switch (status) { 79 88 case PCLIENT_DOWN: 80 // XXX this is the desired result in any case, so ignore it81 break;89 PutHost (host, PCONTROL_HOST_RESP, STACK_BOTTOM); 90 return (TRUE); 82 91 83 92 case PCLIENT_GOOD: … … 96 105 97 106 OffHost (host); 107 HarvestHost (host[0].pid); 108 return (TRUE); 109 } 110 111 int DownHostResponse (Host *host) { 112 113 DownHost (host); 98 114 HarvestHost (host[0].pid); 99 115 return (TRUE); … … 134 150 135 151 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"); 139 153 break; 140 154
Note:
See TracChangeset
for help on using the changeset viewer.
