diff options
author | Lennart Poettering <lennart@poettering.net> | 2007-12-16 21:03:02 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2007-12-16 21:03:02 +0000 |
commit | aec83994fea80aec0965bc9ecc95fe0139be3160 (patch) | |
tree | fc011978a2f332960db81afcc7af96eb866a1f42 /avahi-core | |
parent | 83b48838576d84c9683ba9a7ea0813856bfa9f38 (diff) |
fix detection whether an interface has a routable address assigned on BSD. Patch from zml. Closes #166
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1591 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-core')
-rw-r--r-- | avahi-core/socket.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/avahi-core/socket.c b/avahi-core/socket.c index 265536d..4146d5a 100644 --- a/avahi-core/socket.c +++ b/avahi-core/socket.c @@ -451,7 +451,11 @@ static int sendmsg_loop(int fd, struct msghdr *msg, int flags) { break; if (errno != EAGAIN) { - avahi_log_debug("sendmsg() failed: %s", strerror(errno)); + char where[64]; + struct sockaddr_in *sin = msg->msg_name; + + inet_ntop(sin->sin_family, &sin->sin_addr, where, sizeof(where)); + avahi_log_debug("sendmsg() to %s failed: %s", where, strerror(errno)); return -1; } |