summaryrefslogtreecommitdiff
path: root/dix
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-09-24 11:43:01 -0700
committerKeith Packard <keithp@keithp.com>2012-09-24 11:43:01 -0700
commit4dd5989d15465f3f3480b521d4e36673972fa24a (patch)
tree663c1ce4a48c3936054c80f889510028cf0f7687 /dix
parent0b02150c27e98f996e10d7489f9f67a30e4e3497 (diff)
parent506e3437c73e5ae935ff7c056d7808fbb0c7e614 (diff)
Merge remote-tracking branch 'ajax/server-1.14-abi-churn'
Diffstat (limited to 'dix')
-rw-r--r--dix/dispatch.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/dix/dispatch.c b/dix/dispatch.c
index 0ce10c2f7..2df1a6ea5 100644
--- a/dix/dispatch.c
+++ b/dix/dispatch.c
@@ -3499,14 +3499,16 @@ ProcInitialConnection(ClientPtr client)
REQUEST(xReq);
xConnClientPrefix *prefix;
int whichbyte = 1;
+ char order;
- prefix = (xConnClientPrefix *) ((char *) stuff + sz_xReq);
- if ((prefix->byteOrder != 'l') && (prefix->byteOrder != 'B'))
- return client->noClientException = -1;
- if (((*(char *) &whichbyte) && (prefix->byteOrder == 'B')) ||
- (!(*(char *) &whichbyte) && (prefix->byteOrder == 'l'))) {
- client->swapped = TRUE;
- SwapConnClientPrefix(prefix);
+ prefix = (xConnClientPrefix *) ((char *)stuff + sz_xReq);
+ order = prefix->byteOrder;
+ if (order != 'l' && order != 'B' && order != 'r' && order != 'R')
+ return client->noClientException = -1;
+ if (((*(char *) &whichbyte) && (order == 'B' || order == 'R')) ||
+ (!(*(char *) &whichbyte) && (order == 'l' || order == 'r'))) {
+ client->swapped = TRUE;
+ SwapConnClientPrefix(prefix);
}
stuff->reqType = 2;
stuff->length += bytes_to_int32(prefix->nbytesAuthProto) +
@@ -3514,6 +3516,9 @@ ProcInitialConnection(ClientPtr client)
if (client->swapped) {
swaps(&stuff->length);
}
+ if (order == 'r' || order == 'R') {
+ client->local = FALSE;
+ }
ResetCurrentRequest(client);
return Success;
}