Blame SOURCES/telnet-rh704604.patch
|
|
f3e6c7 |
--- netkit-telnet-0.17/telnet/commands.c.hostalias 2011-07-11 08:07:22.000000000 -0400
|
|
|
f3e6c7 |
+++ netkit-telnet-0.17/telnet/commands.c 2011-07-11 08:10:12.131039660 -0400
|
|
|
f3e6c7 |
@@ -2400,17 +2400,21 @@
|
|
|
f3e6c7 |
ahints.ai_family = PF_UNSPEC;
|
|
|
f3e6c7 |
ahints.ai_socktype = SOCK_STREAM;
|
|
|
f3e6c7 |
ahints.ai_flags = AI_PASSIVE;
|
|
|
f3e6c7 |
error = getaddrinfo(aliasp, "0", &ahints, &ares);
|
|
|
f3e6c7 |
if (error) {
|
|
|
f3e6c7 |
+ printf ("Couldn't get address for %s\n", aliasp);
|
|
|
f3e6c7 |
warn("%s: %s", aliasp, gai_strerror(error));
|
|
|
f3e6c7 |
close(net);
|
|
|
f3e6c7 |
+ net = -1;
|
|
|
f3e6c7 |
continue;
|
|
|
f3e6c7 |
}
|
|
|
f3e6c7 |
if (bind(net, ares->ai_addr, ares->ai_addrlen) < 0) {
|
|
|
f3e6c7 |
+ printf ("Couldn't bind to %s\n", aliasp);
|
|
|
f3e6c7 |
perror(aliasp);
|
|
|
f3e6c7 |
(void) close(net); /* dump descriptor */
|
|
|
f3e6c7 |
+ net = -1;
|
|
|
f3e6c7 |
freeaddrinfo(ares);
|
|
|
f3e6c7 |
continue;
|
|
|
f3e6c7 |
}
|
|
|
f3e6c7 |
freeaddrinfo(ares);
|
|
|
f3e6c7 |
}
|