aboutsummaryrefslogtreecommitdiffstats
path: root/socket.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2006-04-02 21:15:37 +0000
committerWayne Davison <wayned@samba.org>2006-04-02 21:15:37 +0000
commite2d774cdd7e00d9680a5f68d3b81c2bed7a37d40 (patch)
tree753c5b2fd7b33e4124e74a78afb304e4c7109153 /socket.c
parent415b5983461ac3079cec2f1a80b7d73cbf6328ff (diff)
downloadandroid_external_rsync-e2d774cdd7e00d9680a5f68d3b81c2bed7a37d40.tar.gz
android_external_rsync-e2d774cdd7e00d9680a5f68d3b81c2bed7a37d40.tar.bz2
android_external_rsync-e2d774cdd7e00d9680a5f68d3b81c2bed7a37d40.zip
Improved the bind()-failure message to mention what family failed.
Diffstat (limited to 'socket.c')
-rw-r--r--socket.c3
1 files changed, 2 insertions, 1 deletions
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);