- for (ap = arguments; *ap; ap++) {
-
- if (debug) {
- fprintf(stderr, "Trying to connect to \"%s\" ...\n", *ap);
- }
-
- rc = getaddrinfo(*ap, service, &hints, &res);
-
- if (rc) {
- if (debug) {
- fprintf(stderr, "Lookup of \"%s\" failed: %s\n", *ap,
- gai_strerror(rc));
- }
- continue;
- }
-
- for (ai = res; ai != NULL; ai = ai->ai_next) {
- if (debug) {
- char address[NI_MAXHOST];
- char port[NI_MAXSERV];