From 7dec2a9bcb3a46883fd6835ec6b008663a8a9439 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 10 Jun 2009 07:48:50 +0200 Subject: [PATCH] listen: print debug message before bind() Dump each socket address before binding to it. --- src/listen.c | 7 +++++++ 1 file changed, 7 insertions(+) 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;