|
Lines 2392-2401
channel_setup_fwd_listener(int type, const char *liste
Link Here
|
| 2392 |
if (addr == NULL) { |
2392 |
if (addr == NULL) { |
| 2393 |
/* This really shouldn't happen */ |
2393 |
/* This really shouldn't happen */ |
| 2394 |
packet_disconnect("getaddrinfo: fatal error: %s", |
2394 |
packet_disconnect("getaddrinfo: fatal error: %s", |
| 2395 |
gai_strerror(r)); |
2395 |
get_gai_strerror(r)); |
| 2396 |
} else { |
2396 |
} else { |
| 2397 |
error("channel_setup_fwd_listener: " |
2397 |
error("channel_setup_fwd_listener: " |
| 2398 |
"getaddrinfo(%.64s): %s", addr, gai_strerror(r)); |
2398 |
"getaddrinfo(%.64s): %s", addr, |
|
|
2399 |
get_gai_strerror(r)); |
| 2399 |
} |
2400 |
} |
| 2400 |
return 0; |
2401 |
return 0; |
| 2401 |
} |
2402 |
} |
|
Lines 2709-2715
connect_to(const char *host, u_short port)
Link Here
|
| 2709 |
snprintf(strport, sizeof strport, "%d", port); |
2710 |
snprintf(strport, sizeof strport, "%d", port); |
| 2710 |
if ((gaierr = getaddrinfo(host, strport, &hints, &aitop)) != 0) { |
2711 |
if ((gaierr = getaddrinfo(host, strport, &hints, &aitop)) != 0) { |
| 2711 |
error("connect_to %.100s: unknown host (%s)", host, |
2712 |
error("connect_to %.100s: unknown host (%s)", host, |
| 2712 |
gai_strerror(gaierr)); |
2713 |
get_gai_strerror(gaierr)); |
| 2713 |
return -1; |
2714 |
return -1; |
| 2714 |
} |
2715 |
} |
| 2715 |
for (ai = aitop; ai; ai = ai->ai_next) { |
2716 |
for (ai = aitop; ai; ai = ai->ai_next) { |
|
Lines 2851-2857
x11_create_display_inet(int x11_display_offset, int x1
Link Here
|
| 2851 |
hints.ai_socktype = SOCK_STREAM; |
2852 |
hints.ai_socktype = SOCK_STREAM; |
| 2852 |
snprintf(strport, sizeof strport, "%d", port); |
2853 |
snprintf(strport, sizeof strport, "%d", port); |
| 2853 |
if ((gaierr = getaddrinfo(NULL, strport, &hints, &aitop)) != 0) { |
2854 |
if ((gaierr = getaddrinfo(NULL, strport, &hints, &aitop)) != 0) { |
| 2854 |
error("getaddrinfo: %.100s", gai_strerror(gaierr)); |
2855 |
error("getaddrinfo: %.100s", get_gai_strerror(gaierr)); |
| 2855 |
return -1; |
2856 |
return -1; |
| 2856 |
} |
2857 |
} |
| 2857 |
for (ai = aitop; ai; ai = ai->ai_next) { |
2858 |
for (ai = aitop; ai; ai = ai->ai_next) { |
|
Lines 3002-3008
x11_connect_display(void)
Link Here
|
| 3002 |
hints.ai_socktype = SOCK_STREAM; |
3003 |
hints.ai_socktype = SOCK_STREAM; |
| 3003 |
snprintf(strport, sizeof strport, "%u", 6000 + display_number); |
3004 |
snprintf(strport, sizeof strport, "%u", 6000 + display_number); |
| 3004 |
if ((gaierr = getaddrinfo(buf, strport, &hints, &aitop)) != 0) { |
3005 |
if ((gaierr = getaddrinfo(buf, strport, &hints, &aitop)) != 0) { |
| 3005 |
error("%.100s: unknown host. (%s)", buf, gai_strerror(gaierr)); |
3006 |
error("%.100s: unknown host. (%s)", buf, |
|
|
3007 |
get_gai_strerror(gaierr)); |
| 3006 |
return -1; |
3008 |
return -1; |
| 3007 |
} |
3009 |
} |
| 3008 |
for (ai = aitop; ai; ai = ai->ai_next) { |
3010 |
for (ai = aitop; ai; ai = ai->ai_next) { |