diff options
author | grm <grm@eyesin.space> | 2025-03-02 14:42:46 +0200 |
---|---|---|
committer | grm <grm@eyesin.space> | 2025-03-02 14:42:46 +0200 |
commit | a043eb3931b58d9370565734211508af1f83fe94 (patch) | |
tree | 92df69f9d7511e83b88df5604558b669c5b2a899 /src/web.c | |
parent | 092f4e2740a2e59a6b6c5aa064f59d9970790e23 (diff) | |
download | synth-project-a043eb3931b58d9370565734211508af1f83fe94.tar.gz synth-project-a043eb3931b58d9370565734211508af1f83fe94.tar.bz2 synth-project-a043eb3931b58d9370565734211508af1f83fe94.zip |
Add template and suppress verbose logging
Diffstat (limited to 'src/web.c')
-rw-r--r-- | src/web.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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"); |