From 8217c29d2d8b29bd66bc54fee3fe5cb3385a05c7 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 25 May 2016 23:43:49 -0700 Subject: [PATCH] Allow 1024 and 2048 for LimitClients There's no reason not to offer ridiculous numbers of clients; only a few static data structures are arrays of this length. Signed-off-by: Keith Packard Reviewed-by: Adam Jackson --- include/misc.h | 2 +- os/utils.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/misc.h b/include/misc.h index 006f76822..01747fd38 100644 --- a/include/misc.h +++ b/include/misc.h @@ -87,7 +87,7 @@ OF THIS SOFTWARE. #ifndef MAXGPUSCREENS #define MAXGPUSCREENS 16 #endif -#define MAXCLIENTS 512 +#define MAXCLIENTS 2048 #define LIMITCLIENTS 256 /* Must be a power of 2 and <= MAXCLIENTS */ #define MAXEXTENSIONS 128 #define MAXFORMATS 8 diff --git a/os/utils.c b/os/utils.c index 868a2d6de..ac55cd79f 100644 --- a/os/utils.c +++ b/os/utils.c @@ -867,8 +867,10 @@ ProcessCommandLine(int argc, char *argv[]) if (LimitClients != 64 && LimitClients != 128 && LimitClients != 256 && - LimitClients != 512) { - FatalError("maxclients must be one of 64, 128, 256 or 512\n"); + LimitClients != 512 && + LimitClients != 1024 && + LimitClients != 2048) { + FatalError("maxclients must be one of 64, 128, 256, 512, 1024 or 2048\n"); } } else UseMsg();