diff options
author | Michael Adam <obnox@samba.org> | 2013-11-08 11:39:23 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2013-11-09 13:34:33 +0100 |
commit | 5392e9829c186b5d09f135c7f379f18f0738745a (patch) | |
tree | b403345507d1577d326944c6dcc440f6163f4bf5 /src | |
parent | fa26ad4d566f2c3a34f1c6e7158a9268267f2582 (diff) | |
download | tinyproxy-5392e9829c186b5d09f135c7f379f18f0738745a.tar.gz tinyproxy-5392e9829c186b5d09f135c7f379f18f0738745a.zip |
sock: in listen_sock(), add debug message when socket() call failed.
Signed-off-by: Michael Adam <obnox@samba.org>
Diffstat (limited to '')
-rw-r--r-- | src/sock.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -195,8 +195,12 @@ int listen_sock (const char *addr, uint16_t port, vector_t listen_fds) listenfd = socket (rp->ai_family, rp->ai_socktype, rp->ai_protocol); - if (listenfd == -1) + if (listenfd == -1) { + log_message(LOG_ERR, + "failed to create socket: %s", + strerror(errno)); continue; + } setsockopt (listenfd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof (on)); |