diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2011-03-28 21:10:16 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2011-03-28 21:10:16 +0000 |
commit | 73cf4139b3e2f2ee57ae7f508a00e0897a0eb16b (patch) | |
tree | a7d2b1f73f9026b89d407b25d6ab3d02804b0900 /xserver | |
parent | d18ff263177ea8156866b25c46bcad7324e42d76 (diff) |
WriteReplyToClient() swaps rep contents if client and server endianess
differ. Cache rep.length so that it can be used after returning from
WriteReplyToClient().
Fixes xinput --list when client and server have different endianess.
gtk3-demo now fails a bit further in this case.
Diffstat (limited to 'xserver')
-rw-r--r-- | xserver/Xi/xiquerydevice.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xserver/Xi/xiquerydevice.c b/xserver/Xi/xiquerydevice.c index 303c8b27d..cc7eca630 100644 --- a/xserver/Xi/xiquerydevice.c +++ b/xserver/Xi/xiquerydevice.c @@ -152,9 +152,9 @@ ProcXIQueryDevice(ClientPtr client) } } } - + len = rep.length*4; WriteReplyToClient(client, sizeof(xXIQueryDeviceReply), &rep); - WriteToClient(client, rep.length * 4, ptr); + WriteToClient(client, len, ptr); free(ptr); free(skip); return rc; |