diff --git a/connect.c b/connect.c
index 5048653639b3eea4c68eaaa4382363b2bc468e06..da89c9cfcf3469dfab789f2644f953ea46666e90 100644 (file)
--- a/connect.c
+++ b/connect.c
if (colon) {
*colon = 0;
port = colon + 1;
if (colon) {
*colon = 0;
port = colon + 1;
+ if (!*port)
+ port = "<none>";
}
memset(&hints, 0, sizeof(hints));
}
memset(&hints, 0, sizeof(hints));
gai = getaddrinfo(host, port, &hints, &ai);
if (gai)
gai = getaddrinfo(host, port, &hints, &ai);
if (gai)
- die("Unable to look up %s (%s)", host, gai_strerror(gai));
+ die("Unable to look up %s (port %s) (%s)", host, port, gai_strerror(gai));
for (ai0 = ai; ai; ai = ai->ai_next) {
sockfd = socket(ai->ai_family,
for (ai0 = ai; ai; ai = ai->ai_next) {
sockfd = socket(ai->ai_family,