Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CMakeLists-implied-options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,11 @@ if (LWS_IPV6)
set(LWS_WITH_IPV6 1)
endif()

if (LWS_HAVE_LINUX_IPV6_H AND NOT LWS_INCLUDE_LINUX_IPV6_H)
message(STATUS "Found linux/ipv6.h but not including it.")
set(LWS_HAVE_LINUX_IPV6_H 0)
endif()

if (LWS_UNIX_SOCK)
set(LWS_WITH_UNIX_SOCK 1)
endif()
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ option(LWS_WITH_HTTP2 "Compile with server support for HTTP/2" ON)
option(LWS_WITH_LWSWS "Libwebsockets Webserver" OFF)
option(LWS_WITH_CGI "Include CGI (spawn process with network-connected stdin/out/err) APIs" OFF)
option(LWS_IPV6 "Compile with support for ipv6" OFF)
option(LWS_INCLUDE_LINUX_IPV6_H "Include Linux ipv6.h header if found" ON)
option(LWS_UNIX_SOCK "Compile with support for UNIX domain socket if OS supports it" ON)
option(LWS_WITH_PLUGINS "Support plugins for protocols and extensions (implies LWS_WITH_PLUGINS_API)" OFF)
option(LWS_WITH_PLUGINS_BUILTIN "Build the plugin protocols directly into lws library" OFF)
Expand Down
4 changes: 3 additions & 1 deletion lib/roles/h1/ops-h1.c
Original file line number Diff line number Diff line change
Expand Up @@ -974,8 +974,10 @@ static const char * const http_methods[] = {
int
_lws_is_http_method(const char *method)
{
int n;

if (method)
for (int n = 0; n < (int)LWS_ARRAY_SIZE(http_methods); n++)
for (n = 0; n < (int)LWS_ARRAY_SIZE(http_methods); n++)
if (!strcmp(method, http_methods[n]))
return 1;

Expand Down
3 changes: 3 additions & 0 deletions lib/roles/netlink/ops-netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include <sys/socket.h>
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
#include <linux/version.h>

//#define lwsl_netlink lwsl_notice
#define lwsl_cx_netlink lwsl_cx_info
Expand Down Expand Up @@ -207,10 +208,12 @@ rops_handle_POLLIN_netlink(struct lws_context_per_thread *pt, struct lws *wsi,
lws_sa46_write_numeric_address(&robj.dest, buf, sizeof(buf));
lwsl_cx_netlink_debug(cx, "IFA_ADDRESS: %s/%d", buf, robj.dest_len);
break;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)
case IFA_FLAGS:
lwsl_cx_netlink_debug(cx, "IFA_FLAGS: 0x%x (not handled)",
*(unsigned int*)RTA_DATA(ra));
break;
#endif
case IFA_BROADCAST:
lwsl_cx_netlink_debug(cx, "IFA_BROADCAST (not handled)");
break;
Expand Down
3 changes: 2 additions & 1 deletion plugins/deaddrop/protocol_lws_deaddrop.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,9 @@ handler_server_protocol_init(struct lws *wsi, void *in)
* lws event loop on our vhost, so we can be told about
* external changes to the dir contents
*/
vhd->inotify_fd = inotify_init1(IN_NONBLOCK);
vhd->inotify_fd = inotify_init();
if (vhd->inotify_fd >= 0) {
fcntl(vhd->inotify_fd, F_SETFL, O_NONBLOCK);
if (inotify_add_watch(vhd->inotify_fd, vhd->upload_dir,
IN_CLOSE_WRITE | IN_DELETE |
IN_MOVED_FROM | IN_MOVED_TO) >= 0)
Expand Down