diff options
author | marha <marha@users.sourceforge.net> | 2012-01-11 08:55:02 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-01-11 08:57:05 +0100 |
commit | a73c45b7c72c6e426e1c75dd939f5481227b6979 (patch) | |
tree | aba5ced82f492a7e28dfa683144dfbd6293d9613 /xorg-server/os/connection.c | |
parent | d60b5206a10c9d547a7230a991593b516e412204 (diff) | |
parent | 38e661c7d82fa0b34fbe9b3f3261295787bb6427 (diff) | |
download | vcxsrv-a73c45b7c72c6e426e1c75dd939f5481227b6979.tar.gz vcxsrv-a73c45b7c72c6e426e1c75dd939f5481227b6979.tar.bz2 vcxsrv-a73c45b7c72c6e426e1c75dd939f5481227b6979.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
pixman/pixman/pixman-trap.c
xorg-server/Xext/xace.c
xorg-server/dix/dispatch.c
xorg-server/hw/xwin/winclipboardthread.c
xorg-server/hw/xwin/winengine.c
xorg-server/hw/xwin/winwin32rootlesswindow.c
xorg-server/include/dixstruct.h
xorg-server/os/connection.c
Diffstat (limited to 'xorg-server/os/connection.c')
-rw-r--r-- | xorg-server/os/connection.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/xorg-server/os/connection.c b/xorg-server/os/connection.c index 237bda811..1d80f22b3 100644 --- a/xorg-server/os/connection.c +++ b/xorg-server/os/connection.c @@ -774,7 +774,7 @@ AllocNewConnection (XtransConnInfo trans_conn, int fd, CARD32 conn_time) free(oc); return NullClient; } - oc->local_client = ComputeLocalClient(client); + client->local = ComputeLocalClient(client); #if !defined(WIN32) ConnectionTranslation[fd] = client->index; #else @@ -902,6 +902,8 @@ EstablishNewConnections(ClientPtr clientUnused, pointer closure) * Fail a connection due to lack of client or file descriptor space ************/ +#define BOTIMEOUT 200 /* in milliseconds */ + static void ErrorConnMax(XtransConnInfo trans_conn) { @@ -909,7 +911,7 @@ ErrorConnMax(XtransConnInfo trans_conn) xConnSetupPrefix csp; char pad[3]; struct iovec iov[3]; - char byteOrder = 0; + char order = 0; int whichbyte = 1; struct timeval waittime; fd_set mask; @@ -922,16 +924,16 @@ ErrorConnMax(XtransConnInfo trans_conn) FD_SET(fd, &mask); (void)Select(fd + 1, &mask, NULL, NULL, &waittime); /* try to read the byte-order of the connection */ - (void)_XSERVTransRead(trans_conn, &byteOrder, 1); - if ((byteOrder == 'l') || (byteOrder == 'B')) + (void)_XSERVTransRead(trans_conn, &order, 1); + if (order == 'l' || order == 'B' || order == 'r' || order == 'R') { csp.success = xFalse; csp.lengthReason = sizeof(NOROOM) - 1; csp.length = (sizeof(NOROOM) + 2) >> 2; csp.majorVersion = X_PROTOCOL; csp.minorVersion = X_PROTOCOL_REVISION; - if (((*(char *) &whichbyte) && (byteOrder == 'B')) || - (!(*(char *) &whichbyte) && (byteOrder == 'l'))) + if (((*(char *) &whichbyte) && (order == 'B' || order == 'R')) || + (!(*(char *) &whichbyte) && (order == 'l' || order == 'r'))) { swaps(&csp.majorVersion); swaps(&csp.minorVersion); @@ -1070,7 +1072,7 @@ CloseDownConnection(ClientPtr client) ErrorF("CloseDownConnection: client index = %d, socket fd = %d\n", client->index, oc->fd); #endif - if (oc->output && oc->output->count) + if (oc->output) FlushClient(client, oc, (char *)NULL, 0); #ifdef XDMCP XdmcpCloseDisplay(oc->fd); |