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/CheckSystem.c

    r21379 r25872  
    357357      return (TRUE);
    358358    }
    359     dtime = DTIME (host[0].nexttry, start);
     359    dtime = DTIME (host[0].next_start_try, start);
    360360    if (dtime > 0) {
    361361      PutHost (host, PCONTROL_HOST_DOWN, STACK_BOTTOM);
     
    383383  float dtime;
    384384
    385   /* check if there are any pending jobs, otherwise skip step */
     385  /* check if there are any pending jobs */
    386386  stack = GetJobStack (PCONTROL_JOB_PENDING);
    387   if (!stack[0].Nobject) return (0);
     387
     388  /* if there are no pending jobs and we are not in STAGE_NEEDHOST, skip test */
     389  if (!stack[0].Nobject && (Stage != PCONTROL_JOB_STAGE_NEEDHOST)) return (0);
     390
     391  /* if there are no pending jobs, check for hosts that need to be reset */
     392  if (!stack[0].Nobject) {
     393    /* cycle through IDLE hosts */
     394    stack = GetHostStack (PCONTROL_HOST_IDLE);
     395    Nobject = stack[0].Nobject;
     396    for (i = 0; i < Nobject; i++) {
     397      host = PullStackByLocation (stack, STACK_TOP);
     398      if (host == NULL) break;
     399      if (CheckResetHost (host)) {
     400        return (1);
     401      }
     402      PutHost (host, PCONTROL_HOST_IDLE, STACK_BOTTOM);
     403    }
     404    return (0);
     405  }
    388406
    389407  /* Loop through objects on the stack, no more than once. see note above */
Note: See TracChangeset for help on using the changeset viewer.