{"schema":"libjg2-1",
"vpath":"/git/",
"avatar":"/git/avatar/",
"alang":"",
"gen_ut":1752657434,
"reponame":"libwebsockets",
"desc":"libwebsockets lightweight C networking library",
"owner": { "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },"url":"https://libwebsockets.org/repo/libwebsockets",
"f":3,
"items": [
{"schema":"libjg2-1",
"cid":"8346140cd0b33b78b8878be8fb2efb5a",
"commit": {"type":"commit",
"time": 1536661679,
"time_ofs": 480,
"oid_tree": { "oid": "da4b5496fc5639b9b231e597311f5288b6734ed4", "alias": []},
"oid":{ "oid": "95f3eb2980ee42339bb81dfd2d0ee3bcccd2d271", "alias": []},
"msg": "plat: ENOTCONN",
"sig_commit": { "git_time": { "time": 1536661679, "offset": 480 }, "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },
"sig_author": { "git_time": { "time": 1536129910, "offset": 480 }, "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" }},
"body": "plat: ENOTCONN"
,
"diff": "diff --git a/lib/plat/esp32/esp32-sockets.c b/lib/plat/esp32/esp32-sockets.c\nindex 67b39a8..7a592d7 100644\n--- a/lib/plat/esp32/esp32-sockets.c\n+++ b/lib/plat/esp32/esp32-sockets.c\n@@ -82,7 +82,7 @@ lws_plat_check_connection_error(struct lws *wsi)\n \n \n int\n-lws_plat_set_socket_options(struct lws_vhost *vhost, int fd)\n+lws_plat_set_socket_options(struct lws_vhost *vhost, int fd, int unix_skt)\n {\n \tint optval \u003d 1;\n \tsocklen_t optlen \u003d sizeof(optval);\ndiff --git a/lib/plat/esp32/private.h b/lib/plat/esp32/private.h\nindex 574c923..3d32d44 100644\n--- a/lib/plat/esp32/private.h\n+++ b/lib/plat/esp32/private.h\n@@ -49,6 +49,7 @@\n #define LWS_EINPROGRESS EINPROGRESS\n #define LWS_EINTR EINTR\n #define LWS_EISCONN EISCONN\n+ #define LWS_ENOTCONN ENOTCONN\n #define LWS_EWOULDBLOCK EWOULDBLOCK\n \n #define lws_set_blocking_send(wsi)\ndiff --git a/lib/plat/optee/lws-plat-optee.c b/lib/plat/optee/lws-plat-optee.c\nindex f100018..84d78bd 100644\n--- a/lib/plat/optee/lws-plat-optee.c\n+++ b/lib/plat/optee/lws-plat-optee.c\n@@ -202,7 +202,7 @@ lws_plat_service(struct lws_context *context, int timeout_ms)\n }\n \n int\n-lws_plat_set_socket_options(struct lws_vhost *vhost, int fd)\n+lws_plat_set_socket_options(struct lws_vhost *vhost, int fd, int unix_skt)\n {\n \treturn 0;\n }\ndiff --git a/lib/plat/optee/private.h b/lib/plat/optee/private.h\nindex 6a49f36..85137c4 100644\n--- a/lib/plat/optee/private.h\n+++ b/lib/plat/optee/private.h\n@@ -55,6 +55,7 @@\n #define LWS_EINPROGRESS EINPROGRESS\n #define LWS_EINTR EINTR\n #define LWS_EISCONN EISCONN\n+ #define LWS_ENOTCONN ENOTCONN\n #define LWS_EWOULDBLOCK EWOULDBLOCK\n \n #define lws_set_blocking_send(wsi)\ndiff --git a/lib/plat/unix/private.h b/lib/plat/unix/private.h\nindex b9e8bfa..fcd0535 100644\n--- a/lib/plat/unix/private.h\n+++ b/lib/plat/unix/private.h\n@@ -125,6 +125,7 @@\n #define LWS_EINPROGRESS EINPROGRESS\n #define LWS_EINTR EINTR\n #define LWS_EISCONN EISCONN\n+#define LWS_ENOTCONN ENOTCONN\n #define LWS_EWOULDBLOCK EWOULDBLOCK\n #define lws_set_blocking_send(wsi)\n #define LWS_SOCK_INVALID (-1)\ndiff --git a/lib/plat/unix/unix-sockets.c b/lib/plat/unix/unix-sockets.c\nindex b423eaa..bd4c4a6 100644\n--- a/lib/plat/unix/unix-sockets.c\n+++ b/lib/plat/unix/unix-sockets.c\n@@ -66,7 +66,7 @@ lws_send_pipe_choked(struct lws *wsi)\n \n \n int\n-lws_plat_set_socket_options(struct lws_vhost *vhost, int fd)\n+lws_plat_set_socket_options(struct lws_vhost *vhost, int fd, int unix_skt)\n {\n \tint optval \u003d 1;\n \tsocklen_t optlen \u003d sizeof(optval);\n@@ -81,7 +81,7 @@ lws_plat_set_socket_options(struct lws_vhost *vhost, int fd)\n \n \t(void)fcntl(fd, F_SETFD, FD_CLOEXEC);\n \n-\tif (vhost-\u003eka_time) {\n+\tif (!unix_skt \u0026\u0026 vhost-\u003eka_time) {\n \t\t/* enable keepalive on this socket */\n \t\toptval \u003d 1;\n \t\tif (setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE,\n@@ -126,7 +126,7 @@ lws_plat_set_socket_options(struct lws_vhost *vhost, int fd)\n \t}\n \n #if defined(SO_BINDTODEVICE)\n-\tif (vhost-\u003ebind_iface \u0026\u0026 vhost-\u003eiface) {\n+\tif (!unix_skt \u0026\u0026 vhost-\u003ebind_iface \u0026\u0026 vhost-\u003eiface) {\n \t\tlwsl_info(\u0022binding listen skt to %s using SO_BINDTODEVICE\u005cn\u0022, vhost-\u003eiface);\n \t\tif (setsockopt(fd, SOL_SOCKET, SO_BINDTODEVICE, vhost-\u003eiface,\n \t\t\t\tstrlen(vhost-\u003eiface)) \u003c 0) {\n@@ -139,18 +139,18 @@ lws_plat_set_socket_options(struct lws_vhost *vhost, int fd)\n \t/* Disable Nagle */\n \toptval \u003d 1;\n #if defined (__sun) || defined(__QNX__)\n-\tif (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (const void *)\u0026optval, optlen) \u003c 0)\n+\tif (!unix_skt \u0026\u0026 setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (const void *)\u0026optval, optlen) \u003c 0)\n \t\treturn 1;\n #elif !defined(__APPLE__) \u0026\u0026 \u005c\n !defined(__FreeBSD__) \u0026\u0026 !defined(__FreeBSD_kernel__) \u0026\u0026 \u005c\n !defined(__NetBSD__) \u0026\u0026 \u005c\n !defined(__OpenBSD__) \u0026\u0026 \u005c\n !defined(__HAIKU__)\n-\tif (setsockopt(fd, SOL_TCP, TCP_NODELAY, (const void *)\u0026optval, optlen) \u003c 0)\n+\tif (!unix_skt \u0026\u0026 setsockopt(fd, SOL_TCP, TCP_NODELAY, (const void *)\u0026optval, optlen) \u003c 0)\n \t\treturn 1;\n #else\n \ttcp_proto \u003d getprotobyname(\u0022TCP\u0022);\n-\tif (setsockopt(fd, tcp_proto-\u003ep_proto, TCP_NODELAY, \u0026optval, optlen) \u003c 0)\n+\tif (!unix_skt \u0026\u0026 setsockopt(fd, tcp_proto-\u003ep_proto, TCP_NODELAY, \u0026optval, optlen) \u003c 0)\n \t\treturn 1;\n #endif\n \ndiff --git a/lib/plat/windows/private.h b/lib/plat/windows/private.h\nindex 185f688..591a683 100644\n--- a/lib/plat/windows/private.h\n+++ b/lib/plat/windows/private.h\n@@ -39,6 +39,7 @@\n #define LWS_EINPROGRESS WSAEINPROGRESS\n #define LWS_EINTR WSAEINTR\n #define LWS_EISCONN WSAEISCONN\n+ #define LWS_ENOTCONN WSAENOTCONN\n #define LWS_EWOULDBLOCK WSAEWOULDBLOCK\n #define MSG_NOSIGNAL 0\n #define SHUT_RDWR SD_BOTH\ndiff --git a/lib/plat/windows/windows-sockets.c b/lib/plat/windows/windows-sockets.c\nindex 99d9f6a..c168a52 100644\n--- a/lib/plat/windows/windows-sockets.c\n+++ b/lib/plat/windows/windows-sockets.c\n@@ -41,7 +41,8 @@ lws_poll_listen_fd(struct lws_pollfd *fd)\n }\n \n int\n-lws_plat_set_socket_options(struct lws_vhost *vhost, lws_sockfd_type fd)\n+lws_plat_set_socket_options(struct lws_vhost *vhost, lws_sockfd_type fd,\n+\t\t\t int unix_skt)\n {\n \tint optval \u003d 1;\n \tint optlen \u003d sizeof(optval);\ndiff --git a/lib/tls/mbedtls/ssl.c b/lib/tls/mbedtls/ssl.c\nindex e0e134c..5ff0d87 100644\n--- a/lib/tls/mbedtls/ssl.c\n+++ b/lib/tls/mbedtls/ssl.c\n@@ -69,7 +69,7 @@ lws_ssl_capable_read(struct lws *wsi, unsigned char *buf, int len)\n \terrno \u003d 0;\n \tn \u003d SSL_read(wsi-\u003etls.ssl, buf, len);\n #if defined(LWS_WITH_ESP32)\n-\tif (!n \u0026\u0026 errno \u003d\u003d ENOTCONN) {\n+\tif (!n \u0026\u0026 errno \u003d\u003d LWS_ENOTCONN) {\n \t\tlwsl_debug(\u0022%p: SSL_read ENOTCONN\u005cn\u0022, wsi);\n \t\treturn LWS_SSL_CAPABLE_ERROR;\n \t}\ndiff --git a/lib/tls/openssl/ssl.c b/lib/tls/openssl/ssl.c\nindex 59250fb..2af4a7a 100644\n--- a/lib/tls/openssl/ssl.c\n+++ b/lib/tls/openssl/ssl.c\n@@ -210,7 +210,7 @@ lws_ssl_capable_read(struct lws *wsi, unsigned char *buf, int len)\n \terrno \u003d 0;\n \tn \u003d SSL_read(wsi-\u003etls.ssl, buf, len);\n #if defined(LWS_WITH_ESP32)\n-\tif (!n \u0026\u0026 errno \u003d\u003d ENOTCONN) {\n+\tif (!n \u0026\u0026 errno \u003d\u003d LWS_ENOTCONN) {\n \t\tlwsl_debug(\u0022%p: SSL_read ENOTCONN\u005cn\u0022, wsi);\n \t\treturn LWS_SSL_CAPABLE_ERROR;\n \t}\n@@ -227,7 +227,7 @@ lws_ssl_capable_read(struct lws *wsi, unsigned char *buf, int len)\n \n \tlwsl_debug(\u0022%p: SSL_read says %d\u005cn\u0022, wsi, n);\n \t/* manpage: returning 0 means connection shut down */\n-\tif (!n || (n \u003d\u003d -1 \u0026\u0026 errno \u003d\u003d ENOTCONN)) {\n+\tif (!n || (n \u003d\u003d -1 \u0026\u0026 errno \u003d\u003d LWS_ENOTCONN)) {\n \t\twsi-\u003esocket_is_permanently_unusable \u003d 1;\n \n \t\treturn LWS_SSL_CAPABLE_ERROR;\n","s":{"c":1752657434,"u": 4670}}
],"g": 6089,"chitpc": 0,"ehitpc": 0,"indexed":0
,
"ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}