IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 23, 2008, 1:17:40 PM (18 years ago)
Author:
eugene
Message:

fixed up the pcontrol / pclient interactions

File:
1 edited

Legend:

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

    r17475 r17476  
    2828      }
    2929
     30      // clear the response data
     31      host[0].response_state = PCONTROL_RESP_NONE;
     32      host[0].response = NULL;
     33
    3034      // host has shutdown; harvest the defunct process
    3135      HarvestHost (host[0].pid);
     
    3741      PutHost (host, PCONTROL_HOST_RESP, STACK_BOTTOM);
    3842      if (job) {
    39         PutJob (job, PCONTROL_JOB_BUSY, STACK_BOTTOM);
     43        PutJob (job, PCONTROL_JOB_RESP, STACK_BOTTOM);
    4044      }
    4145      if (DEBUG || VerboseMode()) gprint (GP_ERR, "host %s is not responding\n", host[0].hostname);
     
    5256  switch (host[0].response_state) {
    5357    case PCONTROL_RESP_START_JOB:
     58      if (DEBUG) fprintf (stderr, "PCONTROL_RESP_START_JOB\n");
    5459      status = StartJobResponse (host);
    55       return (status);
     60      break;
    5661
    5762    case PCONTROL_RESP_CHECK_HOST:
     63      if (DEBUG) fprintf (stderr, "PCONTROL_RESP_CHECK_HOST\n");
    5864      status = CheckHostResponse (host);
    59       return (status);
     65      break;
    6066
    6167    case PCONTROL_RESP_CHECK_DONE_HOST:
     68      if (DEBUG) fprintf (stderr, "PCONTROL_RESP_CHECK_DONE_HOST\n");
    6269      status = CheckDoneHostResponse (host);
    63       return (status);
     70      break;
    6471
    6572    case PCONTROL_RESP_CHECK_BUSY_JOB:
     73      if (DEBUG) fprintf (stderr, "PCONTROL_RESP_BUSY_JOB\n");
    6674      status = CheckBusyJobResponse (host);
    67       return (status);
     75      break;
    6876
    6977    case PCONTROL_RESP_KILL_JOB:
     78      if (DEBUG) fprintf (stderr, "PCONTROL_RESP_KILL_JOB\n");
    7079      status = KillJobResponse (host);
    71       return (status);
     80      break;
    7281
    7382    case PCONTROL_RESP_STOP_HOST:
     83      if (DEBUG) fprintf (stderr, "PCONTROL_RESP_STOP_HOST\n");
    7484      status = StopHostResponse (host);
    75       return (status);
     85      break;
    7686
    7787    default:
     
    7989  }
    8090
    81   ABORT ("should not be able to get here");
     91  // we have detected a valid response, clear the response data
     92  host[0].response_state = PCONTROL_RESP_NONE;
     93  host[0].response = NULL;
     94  return (status);
    8295}     
    8396
Note: See TracChangeset for help on using the changeset viewer.