IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38572


Ignore:
Timestamp:
Jul 6, 2015, 8:06:50 PM (11 years ago)
Author:
eugene
Message:

clarify some error messages; better testing for running on the right pantasks host

Location:
branches/eam_branches/ipp-20150625/Ohana/src/opihi/lib.shell
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20150625/Ohana/src/opihi/lib.shell/ConfigInit.c

    r16900 r38572  
    3838  }
    3939
     40  // XXX this is a bit dangerous : answer may have an arbitrary
     41  // length, but we do not know the available space in 'ptr'
     42  // we really should be passing in the buffer size and limiting the copy
     43
     44
    4045  if (!strcmp (mode, "%s"))  strcpy ((char *) ptr, answer);
    4146  if (!strcmp (mode, "%d"))  *(int *) ptr       = atoi (answer);
  • branches/eam_branches/ipp-20150625/Ohana/src/opihi/lib.shell/SocketOps.c

    r32632 r38572  
    2323  status = gethostname (myHostname, HOST_NAME_MAX);
    2424
    25   fprintf (stderr, "target host: %s, real host: %s\n", hostname, myHostname);
     25  if (strcmp (hostname, myHostname)) {
     26    fprintf (stderr, "target host: %s, real host: %s\n", hostname, myHostname);
     27    fprintf (stderr, "please run on the correct host\n");
     28    exit (2);
     29  }
    2630
    2731  GetPortRange (&start, &stop, portinfo);
     
    197201
    198202  host = gethostbyname (hostname);
     203  if (!host) {
     204    gprint (GP_ERR, "cannot connect to pantasks server %s\n", hostname);
     205    exit (3);
     206  }
     207
    199208  bzero (hostip, 80);
    200209  for (i = 0; i < host[0].h_length; i++) {
  • branches/eam_branches/ipp-20150625/Ohana/src/opihi/lib.shell/gprint.c

    r27592 r38572  
    255255  if (file == NULL) {
    256256    // XXX this is a problem: we are leaving open the old file
    257     fprintf (stderr, "cannot open file %s\n", stream[0].name);
     257    fprintf (stderr, "gprint cannot open file %s\n", stream[0].name);
    258258    free (stream[0].name);
    259259    file = (dest == GP_LOG) ? stdout : stderr;
Note: See TracChangeset for help on using the changeset viewer.