From 75dc08361604fc19addf75e76689670838aaafc7 Mon Sep 17 00:00:00 2001 From: Marc Di Luzio Date: Tue, 21 May 2019 18:27:26 +0100 Subject: [PATCH] Remove artificial max client limit This is just additional code that isn't required, and could mask or cause problems. --- daemon/gamemode.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/daemon/gamemode.c b/daemon/gamemode.c index 5ac275f..335aaf9 100644 --- a/daemon/gamemode.c +++ b/daemon/gamemode.c @@ -82,9 +82,6 @@ struct GameModeContext { static GameModeContext instance = { 0 }; -/* Maximum number of concurrent processes we'll sanely support */ -#define MAX_GAMES 256 - /** * Protect against signals */ @@ -387,12 +384,6 @@ int game_mode_context_register(GameModeContext *self, pid_t client, pid_t reques goto error_cleanup; } - /* Cap the total number of active clients */ - if (game_mode_context_num_clients(self) + 1 > MAX_GAMES) { - LOG_ERROR("Max games (%d) reached, not registering %d\n", MAX_GAMES, client); - goto error_cleanup; - } - /* Check the PID first to spare a potentially expensive lookup for the exe */ pthread_rwlock_rdlock(&self->rwlock); // ensure our pointer is sane const GameModeClient *existing = game_mode_context_has_client(self, client);