mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 05:54:08 +00:00
XI: directly write out X_ListInputDevices reply
Write out X_ListInputDevices the reply directly (and do the swapping within the request handler) instead of going through separate callback that's having demux the replies again. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
23
Xi/listdev.c
23
Xi/listdev.c
@@ -384,24 +384,15 @@ ProcXListInputDevices(ClientPtr client)
|
||||
}
|
||||
rep.ndevices = numdevs;
|
||||
rep.length = bytes_to_int32(total_length);
|
||||
WriteReplyToClient(client, sizeof(xListInputDevicesReply), &rep);
|
||||
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
}
|
||||
|
||||
WriteToClient(client, sizeof(xListInputDevicesReply), &rep);
|
||||
WriteToClient(client, total_length, savbuf);
|
||||
free(savbuf);
|
||||
free(skip);
|
||||
return Success;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
*
|
||||
* This procedure writes the reply for the XListInputDevices function,
|
||||
* if the client and server have a different byte ordering.
|
||||
*
|
||||
*/
|
||||
|
||||
void _X_COLD
|
||||
SRepXListInputDevices(ClientPtr client, int size, xListInputDevicesReply * rep)
|
||||
{
|
||||
swaps(&rep->sequenceNumber);
|
||||
swapl(&rep->length);
|
||||
WriteToClient(client, size, rep);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user