WPS: Print setsockopt() failure in debug log

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2014-04-25 23:14:24 +03:00 committed by Jouni Malinen
parent 52cb20730a
commit 27b418715f

View file

@ -244,7 +244,13 @@ struct http_server * http_server_init(struct in_addr *addr, int port,
if (srv->fd < 0)
goto fail;
setsockopt(srv->fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on));
if (setsockopt(srv->fd, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) < 0)
{
wpa_printf(MSG_DEBUG,
"HTTP: setsockopt(SO_REUSEADDR) failed: %s",
strerror(errno));
/* try to continue anyway */
}
if (fcntl(srv->fd, F_SETFL, O_NONBLOCK) < 0)
goto fail;