From 2d1ed64d2aedb1af5476ba011bbd36ddcf00c311 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Wed, 16 Oct 2019 14:33:43 -0400 Subject: [PATCH] dix: Remove -to option to set the default connection timeout One minute is admittedly arbitrary, but again, pretty sure this never gets set on the command line in practice. --- dix/globals.c | 2 -- include/opaque.h | 1 - include/site.h | 1 - man/Xserver.man | 3 --- os/connection.c | 6 +++--- os/utils.c | 7 ------- 6 files changed, 3 insertions(+), 17 deletions(-) diff --git a/dix/globals.c b/dix/globals.c index a5d9b7eef..7f5dc7c51 100644 --- a/dix/globals.c +++ b/dix/globals.c @@ -118,5 +118,3 @@ const char *display; int displayfd = -1; Bool explicit_display = FALSE; char *ConnectionInfo; - -CARD32 TimeOutValue = DEFAULT_TIMEOUT * MILLI_PER_SECOND; diff --git a/include/opaque.h b/include/opaque.h index 043f1013d..256261c2a 100644 --- a/include/opaque.h +++ b/include/opaque.h @@ -42,7 +42,6 @@ extern _X_EXPORT volatile char dispatchException; #define DE_TERMINATE 2 #define DE_PRIORITYCHANGE 4 /* set when a client's priority changes */ -extern _X_EXPORT CARD32 TimeOutValue; extern _X_EXPORT int ScreenSaverBlanking; extern _X_EXPORT int ScreenSaverAllowExposures; extern _X_EXPORT int defaultScreenSaverBlanking; diff --git a/include/site.h b/include/site.h index 67a9094ae..524b8547d 100644 --- a/include/site.h +++ b/include/site.h @@ -51,7 +51,6 @@ SOFTWARE. * The following constants contain default values for all of the variables * that can be initialized on the server command line or in the environment. */ -#define DEFAULT_TIMEOUT 60 /* seconds */ #define DEFAULT_KEYBOARD_CLICK 0 #define DEFAULT_BELL 50 #define DEFAULT_BELL_PITCH 400 diff --git a/man/Xserver.man b/man/Xserver.man index 2e3fbee06..27ce83279 100644 --- a/man/Xserver.man +++ b/man/Xserver.man @@ -269,9 +269,6 @@ This overrides a previous .B \-noreset command line option. .TP 8 -.B \-to \fIseconds\fP -sets default connection timeout in seconds. -.TP 8 .B \-tst disables all testing extensions (e.g., XTEST, XTrap, XTestExtension1, RECORD). .TP 8 diff --git a/os/connection.c b/os/connection.c index 5a05d7a1d..a1c42aede 100644 --- a/os/connection.c +++ b/os/connection.c @@ -647,10 +647,10 @@ AllocNewConnection(XtransConnInfo trans_conn, int fd, CARD32 conn_time) /***************** * EstablishNewConnections - * If anyone is waiting on listened sockets, accept them. - * Updates AllClients and AllSockets. + * If anyone is waiting on listened sockets, accept them. Drop pending + * connections if they've stuck around for more than one minute. *****************/ - +#define TimeOutValue 60 * MILLI_PER_SECOND static void EstablishNewConnections(int curconn, int ready, void *data) { diff --git a/os/utils.c b/os/utils.c index 7c3176344..c594acc2b 100644 --- a/os/utils.c +++ b/os/utils.c @@ -560,7 +560,6 @@ UseMsg(void) ErrorF("-seat string seat to run on\n"); ErrorF("-t # default pointer threshold (pixels/t)\n"); ErrorF("-terminate terminate at server reset\n"); - ErrorF("-to # connection time out\n"); ErrorF("-tst disable testing extensions\n"); ErrorF("ttyxx server started from init on /dev/ttyxx\n"); ErrorF("v video blanking for screen-saver\n"); @@ -916,12 +915,6 @@ ProcessCommandLine(int argc, char *argv[]) else if (strcmp(argv[i], "-terminate") == 0) { dispatchExceptionAtReset = DE_TERMINATE; } - else if (strcmp(argv[i], "-to") == 0) { - if (++i < argc) - TimeOutValue = ((CARD32) atoi(argv[i])) * MILLI_PER_SECOND; - else - UseMsg(); - } else if (strcmp(argv[i], "-tst") == 0) { noTestExtensions = TRUE; }