IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

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

updated pcontrol to restart pclients that have been connected for too long

File:
1 edited

Legend:

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

    r17476 r25872  
    3232      host[0].response = NULL;
    3333
    34       // host has shutdown; harvest the defunct process
     34      // if want the host to be shutdown, accept the result
     35      if (host[0].response_state == PCONTROL_RESP_DOWN_HOST) {
     36        if (DEBUG) fprintf (stderr, "PCONTROL_RESP_DOWN_HOST\n");
     37        DownHostResponse (host);
     38        return TRUE;
     39      }
     40      if (host[0].response_state == PCONTROL_RESP_STOP_HOST) {
     41        if (DEBUG) fprintf (stderr, "PCONTROL_RESP_STOP_HOST\n");
     42        StopHostResponse (host);
     43        return TRUE;
     44      }
     45
     46      // host has unexpectedly shutdown; harvest the defunct process
    3547      HarvestHost (host[0].pid);
    3648      PutHost (host, PCONTROL_HOST_DOWN, STACK_BOTTOM);
     
    4759
    4860    case PCLIENT_GOOD:
    49       if (VerboseMode()) gprint (GP_ERR, "message received (CheckRespHost)\n"); 
    5061      break;
    5162
     
    8091      break;
    8192
     93    case PCONTROL_RESP_DOWN_HOST:
     94      if (DEBUG) fprintf (stderr, "PCONTROL_RESP_DOWN_HOST\n");
     95      status = DownHostResponse (host);
     96      break;
     97
    8298    case PCONTROL_RESP_STOP_HOST:
    8399      if (DEBUG) fprintf (stderr, "PCONTROL_RESP_STOP_HOST\n");
Note: See TracChangeset for help on using the changeset viewer.