summaryrefslogtreecommitdiffstats
path: root/src/web.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/web.c')
-rw-r--r--src/web.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/web.c b/src/web.c
index 3108545..f3aa5f7 100644
--- a/src/web.c
+++ b/src/web.c
@@ -58,8 +58,6 @@ char *read_file_to_string(const char *filename) {
return buffer;
}
-
-
int
key_to_number(char key) {
switch (key) {
@@ -207,13 +205,13 @@ void *websocket_server_thread(void *arg) {
info.pt_serv_buf_size = 32 * 1024;
info.options = LWS_SERVER_OPTION_VALIDATE_UTF8;
- context = lws_create_context(&info);
+ context = lws_create_context(&info);
if (!context) {
fprintf(stderr, "lws_create_context failed\n");
return NULL;
}
- printf("WebSocket server running on ws://localhost:%d\n", WS_PORT);
+ printf("WebSocket server running on ws://localhost:%d [http://localhost:%d]\n", WS_PORT, WS_PORT);
while (1) {
lws_service(context, 1000); // Service WebSocket events
@@ -259,6 +257,8 @@ init_web(synth_t * synth)
html_content = get_from_template();
synthx = synth;
+ lws_set_log_level(LLL_WARN, NULL);
+
// Create a new thread for the WebSocket server
if (pthread_create(&server_thread, NULL, websocket_server_thread, NULL) != 0) {
fprintf(stderr, "Failed to create server thread\n");