IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 33659


Ignore:
Timestamp:
Apr 1, 2012, 3:11:34 PM (14 years ago)
Author:
eugene
Message:

use exotic rconnect_elixir

Location:
trunk/Ohana/src/elixir
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/elixir/include/elixir.h

    r21153 r33659  
    169169int       WaitMsg (char *fifo, char **message, double maxdelay);
    170170int       WriteMsg (char *fifo, char *message);
    171 int       memstr (char *m1, char *m2, int n);
    172 int       rconnect (char *hostname, char *command, int *rsock, int *wsock);
    173 void GetConfig (char *config, char *field, char *format, int N, void *ptr);
     171void      GetConfig (char *config, char *field, char *format, int N, void *ptr);
     172int       rconnect_elixir (char *hostname, char *command, int *rsock, int *wsock);
  • trunk/Ohana/src/elixir/src/MachineOps.c

    r27588 r33659  
    202202  char line[256];
    203203
    204   pid = rconnect (machine[0].hostname, CONNECT, &rsock, &wsock);
     204  pid = rconnect_elixir (machine[0].hostname, CONNECT, &rsock, &wsock);
    205205  if (pid) {
    206206    machine[0].rsock = rsock;
  • trunk/Ohana/src/elixir/src/RemoteOps.c

    r27611 r33659  
    1515
    1616  /* set signal to remote machine */
    17   if (!rconnect (machine, CONNECT, &rsock, &wsock)) {
     17  if (!rconnect_elixir (machine, CONNECT, &rsock, &wsock)) {
    1818    fprintf (stderr, "can't make connection to machine %s to kill process\n", machine);
    1919    exit (1);
     
    4747
    4848  /* send signal to remote machine */
    49   if (!rconnect (machine, CONNECT, &rsock, &wsock)) {
     49  if (!rconnect_elixir (machine, CONNECT, &rsock, &wsock)) {
    5050    fprintf (stderr, "can't make connection to machine %s to kill process\n", machine);
    5151    exit (1);
     
    9090
    9191  /* send signal to remote machine */
    92   if (!rconnect (machine, CONNECT, &rsock, &wsock)) {
     92  if (!rconnect_elixir (machine, CONNECT, &rsock, &wsock)) {
    9393    fprintf (stderr, "can't make connection to machine %s to signal process\n", machine);
    9494    exit (1);
     
    151151
    152152  /* make connection to remote machine */
    153   if (!rconnect (machine, CONNECT, &rsock, &wsock)) {
     153  if (!rconnect_elixir (machine, CONNECT, &rsock, &wsock)) {
    154154    fprintf (stderr, "can't make connection to machine %s to kill process\n", machine);
    155155    exit (1);
  • trunk/Ohana/src/elixir/src/SockScan.c

    r10336 r33659  
    55int SockScan (char *string, Fifo *fifo, int sock) {
    66 
    7   int i, done, status;
     7  int i, status;
     8  char *done;
    89
    9   done = 0;
    10   for (i = 0; (i < MAXTIME) && !done; i++) {
     10  status = FALSE;
     11  done = string;
     12  for (i = 0; (i < MAXTIME) && (done != NULL); i++) {
    1113    ShiftFifo (fifo);
    1214    status = ReadtoFifo (fifo, sock);
     
    2426  return (status);
    2527}
    26 
    27 /* returns (offset to m2) + 1, or 0 if failure */
    28 int memstr (char *m1, char *m2, int n) {
    29 
    30   int i, N;
    31 
    32   N = strlen (m2);
    33   for (i = 0; (i < n - N + 1) && memcmp (m1, m2, N); i++, m1++);
    34   if (memcmp (m1, m2, N)) {
    35     return (0);
    36   }
    37   else {
    38     return (i+1);
    39   }
    40 
    41 }
    4228 
    4329/* SockScan reads from the given socket looking for the given string
  • trunk/Ohana/src/elixir/src/rconnect.c

    r27588 r33659  
    44   one for read, one for write */
    55
    6 int rconnect (char *hostname, char *command, int *rsock, int *wsock) {
     6// this is a slightly different version than the one in libohana -- use a local name
     7int rconnect_elixir (char *hostname, char *command, int *rsock, int *wsock) {
    78
    89  int i, rfd[2], wfd[2], status;
Note: See TracChangeset for help on using the changeset viewer.