Revert "dix: Extend initial connection handshake for forwarding proxies"
This reverts commit 78fa121f40
.
ABI change pended for 1.13
This commit is contained in:
parent
5b9f5c8a53
commit
3be37375ee
|
@ -3582,14 +3582,12 @@ ProcInitialConnection(ClientPtr client)
|
||||||
REQUEST(xReq);
|
REQUEST(xReq);
|
||||||
xConnClientPrefix *prefix;
|
xConnClientPrefix *prefix;
|
||||||
int whichbyte = 1;
|
int whichbyte = 1;
|
||||||
char order;
|
|
||||||
|
|
||||||
prefix = (xConnClientPrefix *)((char *)stuff + sz_xReq);
|
prefix = (xConnClientPrefix *)((char *)stuff + sz_xReq);
|
||||||
order = prefix->byteOrder;
|
if ((prefix->byteOrder != 'l') && (prefix->byteOrder != 'B'))
|
||||||
if (order != 'l' && order != 'B' && order != 'r' && order != 'R')
|
|
||||||
return client->noClientException = -1;
|
return client->noClientException = -1;
|
||||||
if (((*(char *) &whichbyte) && (order == 'B' || order == 'R')) ||
|
if (((*(char *) &whichbyte) && (prefix->byteOrder == 'B')) ||
|
||||||
(!(*(char *) &whichbyte) && (order == 'l' || order == 'r')))
|
(!(*(char *) &whichbyte) && (prefix->byteOrder == 'l')))
|
||||||
{
|
{
|
||||||
client->swapped = TRUE;
|
client->swapped = TRUE;
|
||||||
SwapConnClientPrefix(prefix);
|
SwapConnClientPrefix(prefix);
|
||||||
|
@ -3601,10 +3599,6 @@ ProcInitialConnection(ClientPtr client)
|
||||||
{
|
{
|
||||||
swaps(&stuff->length);
|
swaps(&stuff->length);
|
||||||
}
|
}
|
||||||
if (order == 'r' || order == 'R')
|
|
||||||
{
|
|
||||||
client->local = FALSE;
|
|
||||||
}
|
|
||||||
ResetCurrentRequest(client);
|
ResetCurrentRequest(client);
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
|
@ -882,7 +882,7 @@ ErrorConnMax(XtransConnInfo trans_conn)
|
||||||
xConnSetupPrefix csp;
|
xConnSetupPrefix csp;
|
||||||
char pad[3];
|
char pad[3];
|
||||||
struct iovec iov[3];
|
struct iovec iov[3];
|
||||||
char order = 0;
|
char byteOrder = 0;
|
||||||
int whichbyte = 1;
|
int whichbyte = 1;
|
||||||
struct timeval waittime;
|
struct timeval waittime;
|
||||||
fd_set mask;
|
fd_set mask;
|
||||||
|
@ -895,16 +895,16 @@ ErrorConnMax(XtransConnInfo trans_conn)
|
||||||
FD_SET(fd, &mask);
|
FD_SET(fd, &mask);
|
||||||
(void)Select(fd + 1, &mask, NULL, NULL, &waittime);
|
(void)Select(fd + 1, &mask, NULL, NULL, &waittime);
|
||||||
/* try to read the byte-order of the connection */
|
/* try to read the byte-order of the connection */
|
||||||
(void)_XSERVTransRead(trans_conn, &order, 1);
|
(void)_XSERVTransRead(trans_conn, &byteOrder, 1);
|
||||||
if (order == 'l' || order == 'B' || order == 'r' || order == 'R')
|
if ((byteOrder == 'l') || (byteOrder == 'B'))
|
||||||
{
|
{
|
||||||
csp.success = xFalse;
|
csp.success = xFalse;
|
||||||
csp.lengthReason = sizeof(NOROOM) - 1;
|
csp.lengthReason = sizeof(NOROOM) - 1;
|
||||||
csp.length = (sizeof(NOROOM) + 2) >> 2;
|
csp.length = (sizeof(NOROOM) + 2) >> 2;
|
||||||
csp.majorVersion = X_PROTOCOL;
|
csp.majorVersion = X_PROTOCOL;
|
||||||
csp.minorVersion = X_PROTOCOL_REVISION;
|
csp.minorVersion = X_PROTOCOL_REVISION;
|
||||||
if (((*(char *) &whichbyte) && (order == 'B' || order == 'R')) ||
|
if (((*(char *) &whichbyte) && (byteOrder == 'B')) ||
|
||||||
(!(*(char *) &whichbyte) && (order == 'l' || order == 'r')))
|
(!(*(char *) &whichbyte) && (byteOrder == 'l')))
|
||||||
{
|
{
|
||||||
swaps(&csp.majorVersion);
|
swaps(&csp.majorVersion);
|
||||||
swaps(&csp.minorVersion);
|
swaps(&csp.minorVersion);
|
||||||
|
|
Loading…
Reference in New Issue