version 1.202, 2007/09/04 11:15:55 |
version 1.203, 2007/12/27 14:22:08 |
|
|
gaierr = getaddrinfo(options.bind_address, "0", &hints, &res); |
gaierr = getaddrinfo(options.bind_address, "0", &hints, &res); |
if (gaierr) { |
if (gaierr) { |
error("getaddrinfo: %s: %s", options.bind_address, |
error("getaddrinfo: %s: %s", options.bind_address, |
gai_strerror(gaierr)); |
ssh_gai_strerror(gaierr)); |
close(sock); |
close(sock); |
return -1; |
return -1; |
} |
} |
|
|
hints.ai_socktype = SOCK_STREAM; |
hints.ai_socktype = SOCK_STREAM; |
snprintf(strport, sizeof strport, "%u", port); |
snprintf(strport, sizeof strport, "%u", port); |
if ((gaierr = getaddrinfo(host, strport, &hints, &aitop)) != 0) |
if ((gaierr = getaddrinfo(host, strport, &hints, &aitop)) != 0) |
fatal("%s: %.100s: %s", __progname, host, |
fatal("%s: Could not resolve hostname %.100s: %s", __progname, |
gai_strerror(gaierr)); |
host, ssh_gai_strerror(gaierr)); |
|
|
for (attempt = 0; attempt < connection_attempts; attempt++) { |
for (attempt = 0; attempt < connection_attempts; attempt++) { |
if (attempt > 0) { |
if (attempt > 0) { |