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.
This commit is contained in:
matthieu 2011-03-28 21:10:15 +00:00
parent 1064b1a62a
commit a282fbce7f

View File

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