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