mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-30 00:00:16 +01:00
logs: use finegrained level test on unix-sockets.c
This commit is contained in:
parent
730c954b42
commit
6d88669b69
1 changed files with 3 additions and 3 deletions
|
@ -216,7 +216,7 @@ lws_plat_set_socket_options_ip(lws_sockfd_type fd, uint8_t pri, int lws_flags)
|
||||||
{
|
{
|
||||||
int optval = (int)pri, ret = 0, n;
|
int optval = (int)pri, ret = 0, n;
|
||||||
socklen_t optlen = sizeof(optval);
|
socklen_t optlen = sizeof(optval);
|
||||||
#if !defined(LWS_WITH_NO_LOGS)
|
#if (_LWS_ENABLED_LOGS & LLL_WARN)
|
||||||
int en;
|
int en;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -244,7 +244,7 @@ lws_plat_set_socket_options_ip(lws_sockfd_type fd, uint8_t pri, int lws_flags)
|
||||||
if (pri) { /* 0 is the default already */
|
if (pri) { /* 0 is the default already */
|
||||||
if (setsockopt(fd, SOL_SOCKET, SO_PRIORITY,
|
if (setsockopt(fd, SOL_SOCKET, SO_PRIORITY,
|
||||||
(const void *)&optval, optlen) < 0) {
|
(const void *)&optval, optlen) < 0) {
|
||||||
#if !defined(LWS_WITH_NO_LOGS)
|
#if (_LWS_ENABLED_LOGS & LLL_WARN)
|
||||||
en = errno;
|
en = errno;
|
||||||
lwsl_warn("%s: unable to set socket pri %d: errno %d\n",
|
lwsl_warn("%s: unable to set socket pri %d: errno %d\n",
|
||||||
__func__, (int)pri, en);
|
__func__, (int)pri, en);
|
||||||
|
@ -259,7 +259,7 @@ lws_plat_set_socket_options_ip(lws_sockfd_type fd, uint8_t pri, int lws_flags)
|
||||||
optval = 1;
|
optval = 1;
|
||||||
if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR,
|
if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR,
|
||||||
(const void *)&optval, optlen) < 0) {
|
(const void *)&optval, optlen) < 0) {
|
||||||
#if !defined(LWS_WITH_NO_LOGS)
|
#if (_LWS_ENABLED_LOGS & LLL_WARN)
|
||||||
en = errno;
|
en = errno;
|
||||||
lwsl_warn("%s: unable to reuse local addresses: errno %d\n",
|
lwsl_warn("%s: unable to reuse local addresses: errno %d\n",
|
||||||
__func__, en);
|
__func__, en);
|
||||||
|
|
Loading…
Add table
Reference in a new issue