IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 3204


Ignore:
Timestamp:
Feb 12, 2005, 5:00:47 PM (21 years ago)
Author:
eugene
Message:

pcontrol dev work

Location:
trunk/Ohana/src/opihi/pcontrol
Files:
6 edited

Legend:

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

    r3203 r3204  
    33Stack *HostPool_Idle;
    44Stack *HostPool_Busy;
     5Stack *HostPool_Done;
    56Stack *HostPool_Down;
    67Stack *HostPool_Off;
     
    910  HostPool_Idle = InitStack ();
    1011  HostPool_Busy = InitStack ();
     12  HostPool_Done = InitStack ();
    1113  HostPool_Down = InitStack ();
    1214  HostPool_Off = InitStack ();
     
    1921    case PCONTROL_HOST_DOWN:
    2022      return (HostPool_Down);
     23    case PCONTROL_HOST_DONE:
     24      return (HostPool_Done);
    2125    case PCONTROL_HOST_BUSY:
    2226      return (HostPool_Busy);
     
    2428      return (HostPool_Off);
    2529    default:
    26       fprintf (stderr, "error: unknown host stack\n");
    27       return (NULL);
     30      fprintf (stderr, "error: unknown host stack : programming error\n");
     31      exit (1);
    2832  }
    29   return (NULL);
     33  fprintf (stderr, "error: unknown host stack : programming error\n");
     34  exit (1);
    3035}
    3136
  • trunk/Ohana/src/opihi/pcontrol/IOBufferOps.c

    r3203 r3204  
    99
    1010  ALLOCATE (buffer[0].buffer, char, buffer[0].Nalloc);
     11  bzero (buffer[0].buffer, buffer[0].Nalloc);
    1112
    1213  return (TRUE);
     
    2728
    2829  if (fd == 0) {
     30    fprintf (stderr, "pipe is closed (ReadIOBuffer)\n");
     31    return (0);
    2932    /* pipe is closed */
    30     return (0);
    3133  }
    3234
  • trunk/Ohana/src/opihi/pcontrol/JobOps.c

    r3203 r3204  
    33Stack *JobPool_Pending;
    44Stack *JobPool_Busy;
     5Stack *JobPool_Done;
    56Stack *JobPool_Exit;
    67Stack *JobPool_Crash;
     
    910  JobPool_Pending = InitStack ();
    1011  JobPool_Busy = InitStack ();
     12  JobPool_Done = InitStack ();
    1113  JobPool_Exit = InitStack ();
    1214  JobPool_Crash = InitStack ();
     
    1921    case PCONTROL_JOB_BUSY:
    2022      return (JobPool_Busy);
     23    case PCONTROL_JOB_DONE:
     24      return (JobPool_Done);
    2125    case PCONTROL_JOB_EXIT:
    2226      return (JobPool_Exit);
     
    2428      return (JobPool_Crash);
    2529    default:
    26       fprintf (stderr, "error: unknown job stack\n");
    27       return (NULL);
     30      fprintf (stderr, "error: unknown job stack : programming error\n");
     31      exit (1);
    2832  }
    29   return (NULL);
     33  fprintf (stderr, "error: unknown job stack : programming error\n");
     34  exit (1);
    3035}
    3136
  • trunk/Ohana/src/opihi/pcontrol/StartHost.c

    r3203 r3204  
    55  int pid;
    66  int stdio[3];
     7  char command[64], shell[64];
    78
    89  /* pid = rconnect (CONNECT, host[0].hostname, PCLIENT, stdio); */
    910
    10   pid = rconnect ("ssh", host[0].hostname, "pclient", stdio);
     11  strcpy (command, "ssh");
     12  strcpy (shell, "pclient");
     13
     14  pid = rconnect (command, host[0].hostname, shell, stdio);
    1115  if (!pid) {     /** failure to start **/
    1216    fprintf (stderr, "failure to start %s\n", host[0].hostname);
  • trunk/Ohana/src/opihi/pcontrol/host.c

    r3203 r3204  
    2222    remove_argument (N, &argc, argv);
    2323    Off = TRUE;
     24  }
     25 
     26  /* this section needs some help: find the specified host in the stacks */
     27  On = FALSE;
     28  if ((N = get_argument (argc, argv, "-off"))) {
     29    if (Delete || Off) {
     30      fprintf (stderr, "only one of -delete, -off, -on\n");
     31      return (FALSE);
     32    }
     33    remove_argument (N, &argc, argv);
     34    On = TRUE;
    2435  }
    2536 
  • trunk/Ohana/src/opihi/pcontrol/rconnect.c

    r3203 r3204  
    7878    status = ReadtoIOBuffer (&buffer, stdout_fd[0]);
    7979    p = memstr (buffer.buffer, "CONNECTED", buffer.Nbuffer);
     80    fprintf (stderr, "%d  %d  %s\n", i, buffer.Nbuffer, buffer.buffer);
     81    usleep (20000);
    8082  }
    8183  if (status == 0) goto pipe_error;
Note: See TracChangeset for help on using the changeset viewer.