Index: trunk/Ohana/src/opihi/pcontrol/host.c
===================================================================
--- trunk/Ohana/src/opihi/pcontrol/host.c	(revision 10652)
+++ trunk/Ohana/src/opihi/pcontrol/host.c	(revision 18098)
@@ -1,12 +1,13 @@
 # include "pcontrol.h"
 
-// we use CheckPoints in this function to prevent objects in flight from being missing.
 int host (int argc, char **argv) {
 
-  int StackID;
   IDtype HostID;
   Host *host;
+  Stack *AllHosts;
 
   if (argc != 3) goto usage;
+
+  AllHosts = GetHostStack (PCONTROL_HOST_ALLHOSTS);
 
   if (!strcasecmp (argv[1], "ADD")) {
@@ -15,4 +16,6 @@
     return (TRUE);
   }
+
+  // this one is safe from in-flight entries: no one else pulls from OFF
   if (!strcasecmp (argv[1], "ON")) {
     host = PullHostFromStackByName (PCONTROL_HOST_OFF, argv[2]);
@@ -25,49 +28,51 @@
     return (TRUE);
   }
+
+  // this is a race condition with "CheckDownHosts", but the only 
+  // consequence is that both StartHost and reset set the times to 0.0
   if (!strcasecmp (argv[1], "RETRY")) {
     // no need to use a check point [thief: CheckDownHost (DOWN->IDLE)]
-    host = PullHostFromStackByName (PCONTROL_HOST_DOWN, argv[2]);
+    host = PullHostFromStackByName (PCONTROL_HOST_ALLHOSTS, argv[2]);
     if (!host) {
+      gprint (GP_LOG, "host %s not found\n", argv[2]);
+      return (FALSE);
+    }
+    if (host[0].stack != PCONTROL_HOST_DOWN) {
       gprint (GP_LOG, "host %s is not DOWN\n", argv[2]);
       return (FALSE);
     }
-    /* reset time, place back on DOWN stack */
+    /* reset time, place back on ALLHOSTS stack */
     host[0].nexttry.tv_sec  = 0;
     host[0].nexttry.tv_usec = 0;
     host[0].lasttry.tv_sec  = 0;
     host[0].lasttry.tv_usec = 0;
-    PutHost (host, PCONTROL_HOST_DOWN, STACK_BOTTOM);
+    PushStack (AllHosts, STACK_BOTTOM, host, host[0].HostID, host[0].hostname);
     return (TRUE);
   }
+
   if (!strcasecmp (argv[1], "CHECK")) {
-    SetCheckPoint ();  // ensure the host is on one of the stacks
-    host = PullHostByName (argv[2], &StackID);
+    host = PullHostFromStackByName (PCONTROL_HOST_ALLHOSTS, argv[2]);
     if (host == NULL) {
       gprint (GP_LOG, "host %s not found\n", argv[2]);
-      ClearCheckPoint ();
       return (FALSE);
     }
-    PutHost (host, StackID, STACK_BOTTOM);
-    ClearCheckPoint ();
-
-    gprint (GP_LOG, "host %s is %s\n", argv[2], GetHostStackName (StackID));
+    gprint (GP_LOG, "host %s is %s\n", argv[2], GetHostStackName (host[0].stack));
+    PushStack (AllHosts, STACK_BOTTOM, host, host[0].HostID, host[0].hostname);
     return (TRUE);
   }
+
   if (!strcasecmp (argv[1], "OFF")) {
-    SetCheckPoint (); // ensure we can find the specified host
-    host = PullHostByName (argv[2], &StackID);
+    host = PullHostFromStackByName (PCONTROL_HOST_ALLHOSTS, argv[2]);
     if (host == NULL) {
       gprint (GP_LOG, "host %s not found\n", argv[2]);
-      ClearCheckPoint ();
       return (FALSE);
     }
     host[0].markoff = TRUE;
-    PutHost (host, StackID, STACK_BOTTOM);
-    ClearCheckPoint ();
+    PushStack (AllHosts, STACK_BOTTOM, host, host[0].HostID, host[0].hostname);
     return (TRUE);
   }
 
+  // this one is safe from in-flight entries: no one else pulls from OFF
   if (!strcasecmp (argv[1], "DELETE")) {
-    // a check point is not required: no possible thief
     host = PullHostFromStackByName (PCONTROL_HOST_OFF, argv[2]);
     if (!host) {
