aboutsummaryrefslogtreecommitdiff
path: root/lib/include
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-10-03 21:22:41 -0500
committerIan Moffett <ian@osmora.org>2024-10-03 21:22:41 -0500
commit7f5b307413a29502791fb8cbe6209c0b0f5d2006 (patch)
treeefb44f9f27580194c91857c9b3138b202ef9da29 /lib/include
parent85c4c48480c6f0aabcd8ccb38036392b71a05c2e (diff)
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 <ian@osmora.org>
Diffstat (limited to 'lib/include')
-rw-r--r--lib/include/server.h2
1 files changed, 2 insertions, 0 deletions
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 <ostp/session.h>
#include <pthread.h>
#include <stddef.h>
+#include <stdint.h>
#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 {