Index: trunk/Ohana/src/opihi/pcontrol/ResetJob.c
===================================================================
--- trunk/Ohana/src/opihi/pcontrol/ResetJob.c	(revision 16472)
+++ trunk/Ohana/src/opihi/pcontrol/ResetJob.c	(revision 17475)
@@ -1,8 +1,9 @@
 # include "pcontrol.h"
+
+// XXX deprecated
 
 int ResetJob (Job *job) {
   
   int       status;
-  IOBuffer  buffer;
   Host     *host;
 
@@ -13,41 +14,42 @@
   ASSERT (job != NULL, "host missing");
 
-  InitIOBuffer (&buffer, 0x100);
-  
   /* we have tried to reset the job; may not get status */
   job[0].Reset = TRUE;
 
-  status = PclientCommand (host, "reset", PCLIENT_PROMPT, &buffer);
+  status = PclientCommand (host, "reset");
 
   /* check on success of pclient command */
   switch (status) {
     case PCLIENT_DOWN:
-      /*** different behavior for ANYHOST, WANTHOST, NEEDHOST? ***/
-      gprint (GP_ERR, "host %s is down\n", host[0].hostname);
+      if (VerboseMode()) gprint (GP_ERR, "host %s is down\n", host[0].hostname);
       HarvestHost (host[0].pid);
       PutHost (host, PCONTROL_HOST_DOWN, STACK_BOTTOM);
-      FreeIOBuffer (&buffer);
-      return (FALSE);
-
-    case PCLIENT_HUNG:
-      /*** should we consider a HUNG host DOWN? ***/
-      gprint (GP_ERR, "host %s is not responding (ResetJob)\n", host[0].hostname);
-      FreeIOBuffer (&buffer);
       return (FALSE);
 
     case PCLIENT_GOOD:
-      gprint (GP_ERR, "message received (ResetJob)\n");  
-      FreeIOBuffer (&buffer);
+      host[0].response_state = PCONTROL_RESP_RESET_JOB;
+      host[0].response = PCLIENT_PROMPT;
+      FlushIOBuffer (&host[0].comms_buffer, 0x100);
+      PutHost (host, PCONTROL_HOST_RESP, STACK_BOTTOM);
       return (TRUE);
 
     default:
-      gprint (GP_ERR, "unknown status for pclient command: programming error\n");  
-      pcontrol_exit (55);
+      ABORT ("unknown status for pclient command");  
   }
+  ABORT ("should not reach here (ResetJob)"); 
+}
 
-  gprint (GP_ERR, "programming error in ResetJob (should not reach here)\n");
-  FreeIOBuffer (&buffer);
-  pcontrol_exit (56);
-  return (FALSE);
+int ResetJobResponse (Host *host) {
+  
+  int       status;
+  IOBuffer *buffer;
+
+  /* job must have assigned host */
+  ASSERT (host, "missing host");
+  ASSERT (host[0].job, "missing job");
+  buffer = host[0].comms_buffer;
+
+  gprint (GP_ERR, "message received (ResetJob)\n");  
+  return (TRUE);
 }
 
