- Timestamp:
- Apr 1, 2012, 3:11:34 PM (14 years ago)
- Location:
- trunk/Ohana/src/elixir
- Files:
-
- 5 edited
-
include/elixir.h (modified) (1 diff)
-
src/MachineOps.c (modified) (1 diff)
-
src/RemoteOps.c (modified) (4 diffs)
-
src/SockScan.c (modified) (2 diffs)
-
src/rconnect.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/elixir/include/elixir.h
r21153 r33659 169 169 int WaitMsg (char *fifo, char **message, double maxdelay); 170 170 int 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); 171 void GetConfig (char *config, char *field, char *format, int N, void *ptr); 172 int rconnect_elixir (char *hostname, char *command, int *rsock, int *wsock); -
trunk/Ohana/src/elixir/src/MachineOps.c
r27588 r33659 202 202 char line[256]; 203 203 204 pid = rconnect (machine[0].hostname, CONNECT, &rsock, &wsock);204 pid = rconnect_elixir (machine[0].hostname, CONNECT, &rsock, &wsock); 205 205 if (pid) { 206 206 machine[0].rsock = rsock; -
trunk/Ohana/src/elixir/src/RemoteOps.c
r27611 r33659 15 15 16 16 /* set signal to remote machine */ 17 if (!rconnect (machine, CONNECT, &rsock, &wsock)) {17 if (!rconnect_elixir (machine, CONNECT, &rsock, &wsock)) { 18 18 fprintf (stderr, "can't make connection to machine %s to kill process\n", machine); 19 19 exit (1); … … 47 47 48 48 /* send signal to remote machine */ 49 if (!rconnect (machine, CONNECT, &rsock, &wsock)) {49 if (!rconnect_elixir (machine, CONNECT, &rsock, &wsock)) { 50 50 fprintf (stderr, "can't make connection to machine %s to kill process\n", machine); 51 51 exit (1); … … 90 90 91 91 /* send signal to remote machine */ 92 if (!rconnect (machine, CONNECT, &rsock, &wsock)) {92 if (!rconnect_elixir (machine, CONNECT, &rsock, &wsock)) { 93 93 fprintf (stderr, "can't make connection to machine %s to signal process\n", machine); 94 94 exit (1); … … 151 151 152 152 /* make connection to remote machine */ 153 if (!rconnect (machine, CONNECT, &rsock, &wsock)) {153 if (!rconnect_elixir (machine, CONNECT, &rsock, &wsock)) { 154 154 fprintf (stderr, "can't make connection to machine %s to kill process\n", machine); 155 155 exit (1); -
trunk/Ohana/src/elixir/src/SockScan.c
r10336 r33659 5 5 int SockScan (char *string, Fifo *fifo, int sock) { 6 6 7 int i, done, status; 7 int i, status; 8 char *done; 8 9 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++) { 11 13 ShiftFifo (fifo); 12 14 status = ReadtoFifo (fifo, sock); … … 24 26 return (status); 25 27 } 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 }42 28 43 29 /* SockScan reads from the given socket looking for the given string -
trunk/Ohana/src/elixir/src/rconnect.c
r27588 r33659 4 4 one for read, one for write */ 5 5 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 7 int rconnect_elixir (char *hostname, char *command, int *rsock, int *wsock) { 7 8 8 9 int i, rfd[2], wfd[2], status;
Note:
See TracChangeset
for help on using the changeset viewer.
