Skip to content

Commit

Permalink
suppress LWS errors by default
Browse files Browse the repository at this point in the history
  • Loading branch information
mmertama committed Dec 8, 2024
1 parent b9fe8f8 commit 6cd763d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 0 additions & 1 deletion aspell/gempyre_words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,6 @@ perf
POC
protobuf
Rasberry
Supress
treeview
UIs
uwebsockets
Expand Down
2 changes: 2 additions & 0 deletions gempyrelib/cmake/libwebsockets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ endif()

set(USE_LIBWEBSOCKETS TRUE)

target_compile_definitions(websockets PRIVATE SUPRESS_WS_ERRORS)

macro(socket_dependencies TARGET)
target_link_directories(${TARGET} PRIVATE ${libwebsockets_BINARY_DIR}/lib)
target_compile_definitions(${TARGET} PRIVATE USE_LIBWEBSOCKETS)
Expand Down
7 changes: 5 additions & 2 deletions gempyrelib/src/libwebsockets/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -338,14 +338,17 @@ int LWS_Server::http_callback(lws *wsi, enum lws_callback_reasons reason, void*


static void set_lws_log_level() {
int logs = LLL_USER | LLL_ERR | LLL_NOTICE
int logs = LLL_USER | LLL_NOTICE
/* for LLL_ verbosity above NOTICE to be built into lws,
* lws must have been configured and built with
* -DCMAKE_BUILD_TYPE=DEBUG instead of =RELEASE */
/* | LLL_INFO */ /* | LLL_PARSER */ /* | LLL_HEADER */
/* | LLL_EXT */ /* | LLL_CLIENT */ /* | LLL_LATENCY */
#ifdef LWS_DEBUG
| | LLL_WARN | LLL_DEBUG ;
| LLL_WARN | LLL_DEBUG
#endif
#ifndef SUPRESS_WS_ERRORS
| LLL_ERR
#endif
;
lws_set_log_level(logs, [](int level, const char* line) {
Expand Down

0 comments on commit 6cd763d

Please sign in to comment.