From: Wayne Davison Date: Sun, 2 Apr 2006 21:15:37 +0000 (+0000) Subject: Improved the bind()-failure message to mention what family failed. X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/commitdiff_plain/e2d774cdd7e00d9680a5f68d3b81c2bed7a37d40 Improved the bind()-failure message to mention what family failed. --- diff --git a/socket.c b/socket.c index 9079093c..8570bd20 100644 --- a/socket.c +++ b/socket.c @@ -394,7 +394,8 @@ static int *open_socket_in(int type, int port, const char *bind_addr, if (bind(s, resp->ai_addr, resp->ai_addrlen) < 0) { /* Nope, try another */ int r = asprintf(&errmsgs[ecnt++], - "bind() failed: %s\n", strerror(errno)); + "bind() failed: %s (address-family %d)\n", + strerror(errno), (int)resp->ai_family); if (r < 0) out_of_memory("open_socket_in"); close(s);