From 140c1ede533e3585dcdad89756db8a73655d3bc4 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Wed, 29 Jul 2020 20:36:19 +0100 Subject: [PATCH] eventfd: use eventfd_read to check existence since its what we use --- lib/plat/unix/CMakeLists.txt | 2 +- lib/secure-streams/protocols/ss-h1.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/plat/unix/CMakeLists.txt b/lib/plat/unix/CMakeLists.txt index 50340951a..aa7b6ca46 100644 --- a/lib/plat/unix/CMakeLists.txt +++ b/lib/plat/unix/CMakeLists.txt @@ -80,7 +80,7 @@ if (HAIKU) endif() IF (CMAKE_SYSTEM_NAME STREQUAL Linux) - CHECK_FUNCTION_EXISTS(eventfd LWS_HAVE_EVENTFD) + CHECK_FUNCTION_EXISTS(eventfd_read LWS_HAVE_EVENTFD) endif() list(APPEND LIB_LIST_AT_END m) diff --git a/lib/secure-streams/protocols/ss-h1.c b/lib/secure-streams/protocols/ss-h1.c index ef071b8d6..9d69a6c22 100644 --- a/lib/secure-streams/protocols/ss-h1.c +++ b/lib/secure-streams/protocols/ss-h1.c @@ -313,6 +313,10 @@ secstream_h1(struct lws *wsi, enum lws_callback_reasons reason, void *user, #if defined(LWS_WITH_SS_RIDESHARE) + /* + * We should only especially process multipart ourselves if + */ + if (lws_hdr_copy(wsi, (char *)buf, sizeof(buf), WSI_TOKEN_HTTP_CONTENT_TYPE) > 0 && /* multipart/form-data;