From e6813e8de65eee854bbffe6ab0f8ba158f43b10b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 13 Aug 2008 14:24:45 +0930 Subject: [PATCH] Xi: byte-swap device property requests. --- Xi/xiproperty.c | 44 ++++++++++++++++++++++++++++++++------------ 1 file changed, 32 insertions(+), 12 deletions(-) diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c index c9a01e4b7..b4ccfe653 100644 --- a/Xi/xiproperty.c +++ b/Xi/xiproperty.c @@ -519,6 +519,7 @@ ProcXListDeviceProperties (ClientPtr client) int n; swaps (&rep.sequenceNumber, n); swapl (&rep.length, n); + swaps (&rep.nAtoms, n); } temppAtoms = pAtoms; for (prop = dev->properties.properties; prop; prop = prop->next) @@ -823,60 +824,79 @@ ProcXGetDeviceProperty (ClientPtr client) int SProcXListDeviceProperties (ClientPtr client) { + char n; REQUEST(xListDevicePropertiesReq); + swaps(&stuff->length, n); + REQUEST_SIZE_MATCH(xListDevicePropertiesReq); - (void) stuff; - return BadImplementation; + return (ProcXListDeviceProperties(client)); } int SProcXQueryDeviceProperty (ClientPtr client) { + char n; REQUEST(xQueryDevicePropertyReq); + swaps(&stuff->length, n); + swapl(&stuff->property, n); + REQUEST_SIZE_MATCH(xQueryDevicePropertyReq); - (void) stuff; - return BadImplementation; + return (ProcXQueryDeviceProperty(client)); } int SProcXConfigureDeviceProperty (ClientPtr client) { + char n; REQUEST(xConfigureDevicePropertyReq); + swaps(&stuff->length, n); + swapl(&stuff->property, n); + REQUEST_SIZE_MATCH(xConfigureDevicePropertyReq); - (void) stuff; - return BadImplementation; + return (ProcXConfigureDeviceProperty(client)); } int SProcXChangeDeviceProperty (ClientPtr client) { + char n; REQUEST(xChangeDevicePropertyReq); + swaps(&stuff->length, n); + swapl(&stuff->property, n); + swapl(&stuff->type, n); + swapl(&stuff->nUnits, n); REQUEST_SIZE_MATCH(xChangeDevicePropertyReq); - (void) stuff; - return BadImplementation; + return (ProcXChangeDeviceProperty(client)); } int SProcXDeleteDeviceProperty (ClientPtr client) { + char n; REQUEST(xDeleteDevicePropertyReq); + swaps(&stuff->length, n); + swapl(&stuff->property, n); REQUEST_SIZE_MATCH(xDeleteDevicePropertyReq); - (void) stuff; - return BadImplementation; + return (ProcXDeleteDeviceProperty(client)); } int SProcXGetDeviceProperty (ClientPtr client) { + char n; REQUEST(xGetDevicePropertyReq); + swaps(&stuff->length, n); + swapl(&stuff->property, n); + swapl(&stuff->type, n); + swapl(&stuff->longOffset, n); + swapl(&stuff->longLength, n); REQUEST_SIZE_MATCH(xGetDevicePropertyReq); - (void) stuff; - return BadImplementation; + return (ProcXGetDeviceProperty(client)); }