[PATCH xserver 22/23] Allow 1024 and 2048 for LimitClients

Keith Packard keithp at keithp.com
Thu May 26 23:59:57 UTC 2016


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 <keithp at keithp.com>
---
 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 006f768..01747fd 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 4507c9e..325e435 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -847,8 +847,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();
-- 
2.8.0.rc3



More information about the xorg-devel mailing list