Changeset 35310
- Timestamp:
- Mar 13, 2013, 6:11:52 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20130307/Ohana/src/libkapa/src/KapaOpen.c
r35309 r35310 4 4 # define MY_PORT_MAX 2520 5 5 # define MY_WAIT 100000 6 # define DEBUG 16 # define DEBUG 0 7 7 8 8 static int Nvalid = 0; … … 120 120 return (-1); 121 121 122 accepted:122 accepted: 123 123 { 124 124 // we need to do some minimal handshake here. I will send out … … 126 126 int Nout = write (BindSocket, "KAPA", 4); 127 127 if (Nout != 4) { 128 fprintf (stderr, "connection failed\n");128 if (DEBUG) fprintf (stderr, "connection failed\n"); 129 129 close (BindSocket); 130 130 return (-1); … … 221 221 int Nout = read (InitSocket, line, 4); 222 222 if (Nout != 4) { 223 fprintf (stderr, "connection failed\n");223 if (DEBUG) fprintf (stderr, "connection failed\n"); 224 224 close (InitSocket); 225 225 return (-1); 226 226 } 227 227 if (strncmp (line, "KAPA", 4)) { 228 fprintf (stderr, "connection to the wrong survey\n");228 if (DEBUG) fprintf (stderr, "connection to the wrong server\n"); 229 229 close (InitSocket); 230 230 return (-1); … … 259 259 } 260 260 261 # if (0)262 261 int pid = KapaLaunchCommand (line); 263 262 if (!pid) { … … 265 264 return (-1); 266 265 } 267 # else268 int pid = 1;269 # endif270 266 271 267 # define NTRY 500 … … 320 316 321 317 if (name == NULL) { 322 sprintf (temp, "%s -socket %s &", kapa_exec, socket_name);318 sprintf (temp, "%s -socket %s", kapa_exec, socket_name); 323 319 } else { 324 sprintf (temp, "%s -socket %s -name %s &", kapa_exec, socket_name, name);320 sprintf (temp, "%s -socket %s -name %s", kapa_exec, socket_name, name); 325 321 } 326 322
Note:
See TracChangeset
for help on using the changeset viewer.
