From 7f5b307413a29502791fb8cbe6209c0b0f5d2006 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Thu, 3 Oct 2024 21:22:41 -0500 Subject: server: Fix handling of multiple clients Improve handling of multiple connected clients. This fixes issues related to blocking of one client while another is connected as well as certain race conditions. Signed-off-by: Ian Moffett --- lib/include/server.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/include') diff --git a/lib/include/server.h b/lib/include/server.h index 52f92ce..1c23f61 100644 --- a/lib/include/server.h +++ b/lib/include/server.h @@ -34,6 +34,7 @@ #include #include #include +#include #define MAX_CLIENTS 32 @@ -41,6 +42,7 @@ struct ostp_client { struct ostp_session session; int sockfd; pthread_t td; + volatile uint8_t authed : 1; }; struct ostp_listener { -- cgit v1.2.3