Improved the bind()-failure message to mention what family failed.

This commit is contained in:
Wayne Davison committed 2006-04-02 21:15:37 +00:00
1 parent 415b598346
commit e2d774cdd7
1 file changed
+2 -1
+2 -1
View File
@@ -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);