xserver: Branch 'master' - 2 commits
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Sep 12 20:43:28 UTC 2018
dix/main.c | 2 --
hw/xfree86/common/xf86Config.c | 10 ++++++----
include/opaque.h | 1 -
os/connection.c | 13 -------------
4 files changed, 6 insertions(+), 20 deletions(-)
New commits:
commit 3a4d7c79e7fb14c6f914db921c3dce1c22f62cd9
Author: Adam Jackson <ajax at redhat.com>
Date: Wed Aug 29 15:48:28 2018 -0400
dix: Remove MaxClients
This variable was no longer being read anywhere. MAXCLIENTS the macro is
the compile-time maximum limit, LIMITCLIENTS the macro is the default
limit, LimitClients the variable is the limit for the current server.
Signed-off-by: Adam Jackson <ajax at redhat.com>
diff --git a/dix/main.c b/dix/main.c
index f98643aa5..273f30330 100644
--- a/dix/main.c
+++ b/dix/main.c
@@ -136,8 +136,6 @@ dix_main(int argc, char *argv[], char *envp[])
CheckUserAuthorization();
- InitConnectionLimits();
-
ProcessCommandLine(argc, argv);
alwaysCheckForInput[0] = 0;
diff --git a/include/opaque.h b/include/opaque.h
index 0ba0d64da..bb1f5027b 100644
--- a/include/opaque.h
+++ b/include/opaque.h
@@ -35,7 +35,6 @@ from The Open Group.
extern _X_EXPORT const char *defaultTextFont;
extern _X_EXPORT const char *defaultCursorFont;
-extern _X_EXPORT int MaxClients;
extern _X_EXPORT int LimitClients;
extern _X_EXPORT volatile char isItTimeToYield;
extern _X_EXPORT volatile char dispatchException;
diff --git a/os/connection.c b/os/connection.c
index 229bbe745..de9696ec8 100644
--- a/os/connection.c
+++ b/os/connection.c
@@ -120,7 +120,6 @@ SOFTWARE.
struct ospoll *server_poll;
-int MaxClients = 0;
Bool NewOutputPending; /* not yet attempted to write some new output */
Bool NoListenAll; /* Don't establish any listening sockets */
@@ -162,18 +161,6 @@ lookup_trans_conn(int fd)
return NULL;
}
-/* Set MaxClients */
-
-void
-InitConnectionLimits(void)
-{
- MaxClients = MAXCLIENTS;
-
-#ifdef DEBUG
- ErrorF("InitConnectionLimits: MaxClients = %d\n", MaxClients);
-#endif
-}
-
/*
* If SIGUSR1 was set to SIG_IGN when the server started, assume that either
*
commit 7d689f049c3cc16b8e0cb0103a384a2ceb84ea33
Author: Adam Jackson <ajax at redhat.com>
Date: Wed Aug 29 15:42:20 2018 -0400
xfree86: Fix Option "MaxClients" validation
The old code would not in fact validate the option value, though it
might complain about it in the log. It also didn't let you set some
legal values that the -maxclients command line option would.
Signed-off-by: Adam Jackson <ajax at redhat.com>
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c
index 2c1d335dc..e31030d63 100644
--- a/hw/xfree86/common/xf86Config.c
+++ b/hw/xfree86/common/xf86Config.c
@@ -939,10 +939,12 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
from = X_CMDLINE;
i = -1;
if (xf86GetOptValInteger(FlagOptions, FLAG_MAX_CLIENTS, &i)) {
- if (i != 64 && i != 128 && i != 256 && i != 512)
- ErrorF("MaxClients must be one of 64, 128, 256 or 512\n");
- from = X_CONFIG;
- LimitClients = i;
+ if (Ones(i) != 1 || i < 64 || i > 2048) {
+ ErrorF("MaxClients must be one of 64, 128, 256, 512, 1024, or 2048\n");
+ } else {
+ from = X_CONFIG;
+ LimitClients = i;
+ }
}
xf86Msg(from, "Max clients allowed: %i, resource mask: 0x%x\n",
LimitClients, RESOURCE_ID_MASK);
More information about the xorg-commit
mailing list