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.
This commit is contained in:
Adam Jackson 2019-10-16 14:33:43 -04:00 committed by Adam Jackson
parent 46a275522f
commit 2d1ed64d2a
6 changed files with 3 additions and 17 deletions

View File

@ -118,5 +118,3 @@ const char *display;
int displayfd = -1;
Bool explicit_display = FALSE;
char *ConnectionInfo;
CARD32 TimeOutValue = DEFAULT_TIMEOUT * MILLI_PER_SECOND;

View File

@ -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;

View File

@ -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

View File

@ -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

View File

@ -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)
{

View File

@ -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;
}