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