aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-06-10 07:48:50 +0200
committerMax Kellermann <max@duempel.org>2009-06-10 07:48:50 +0200
commit7dec2a9bcb3a46883fd6835ec6b008663a8a9439 (patch)
tree3ef2e94fd500c2212847b5cc1e350e0bbff6701d /src
parent5372ee406a9bd938608c4c84dd138d9906e24779 (diff)
downloadmpd-7dec2a9bcb3a46883fd6835ec6b008663a8a9439.tar.gz
mpd-7dec2a9bcb3a46883fd6835ec6b008663a8a9439.tar.xz
mpd-7dec2a9bcb3a46883fd6835ec6b008663a8a9439.zip
listen: print debug message before bind()
Dump each socket address before binding to it.
Diffstat (limited to 'src')
-rw-r--r--src/listen.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/listen.c b/src/listen.c
index 0505cff16..d8652eb67 100644
--- a/src/listen.c
+++ b/src/listen.c
@@ -72,10 +72,17 @@ static bool
listen_add_address(int pf, const struct sockaddr *addrp, socklen_t addrlen,
GError **error)
{
+ char *address_string;
int fd;
struct listen_socket *ls;
GIOChannel *channel;
+ address_string = sockaddr_to_string(addrp, addrlen, NULL);
+ if (address_string != NULL) {
+ g_debug("binding to socket address %s", address_string);
+ g_free(address_string);
+ }
+
fd = socket_bind_listen(pf, SOCK_STREAM, 0, addrp, addrlen, 5, error);
if (fd < 0)
return false;