version 1.49, 2002/07/04 10:08:00 |
version 1.50, 2003/03/11 04:01:11 |
|
|
if (res0->ai_next) /* if we have multiple possibilities */ |
if (res0->ai_next) /* if we have multiple possibilities */ |
#endif |
#endif |
{ |
{ |
getnameinfo(res->ai_addr, res->ai_addrlen, |
if (getnameinfo(res->ai_addr, res->ai_addrlen, |
hbuf, sizeof(hbuf), NULL, 0, NI_NUMERICHOST); |
hbuf, sizeof(hbuf), NULL, 0, NI_NUMERICHOST) != 0) |
|
strlcpy(hbuf, "unknown", sizeof(hbuf)); |
fprintf(ttyout, "Trying %s...\n", hbuf); |
fprintf(ttyout, "Trying %s...\n", hbuf); |
} |
} |
s = socket(res->ai_family, res->ai_socktype, res->ai_protocol); |
s = socket(res->ai_family, res->ai_socktype, res->ai_protocol); |
|
|
if (error) { |
if (error) { |
/* this "if" clause is to prevent print warning twice */ |
/* this "if" clause is to prevent print warning twice */ |
if (res->ai_next) { |
if (res->ai_next) { |
getnameinfo(res->ai_addr, res->ai_addrlen, |
if (getnameinfo(res->ai_addr, res->ai_addrlen, |
hbuf, sizeof(hbuf), NULL, 0, |
hbuf, sizeof(hbuf), NULL, 0, |
NI_NUMERICHOST); |
NI_NUMERICHOST) != 0) |
|
strlcpy(hbuf, "(unknown)", |
|
sizeof(hbuf)); |
warn("connect to address %s", hbuf); |
warn("connect to address %s", hbuf); |
} |
} |
cause = "connect"; |
cause = "connect"; |