sock: in listen_sock(), add a log message for when bind() has failed

Signed-off-by: Michael Adam <obnox@samba.org>
This commit is contained in:
Michael Adam 2013-11-08 11:50:12 +01:00
parent b41d140984
commit 947e255d19

View File

@ -214,6 +214,8 @@ int listen_sock (const char *addr, uint16_t port, vector_t listen_fds)
} }
if (bind(listenfd, rp->ai_addr, rp->ai_addrlen) != 0) { if (bind(listenfd, rp->ai_addr, rp->ai_addrlen) != 0) {
log_message (LOG_ERR,
"bind failed: %s", strerror (errno));
close (listenfd); close (listenfd);
continue; continue;
} }