summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@redhat.com>2008-08-13 14:24:45 +0930
committerPeter Hutterer <peter.hutterer@redhat.com>2008-08-14 15:01:18 +0930
commite6813e8de65eee854bbffe6ab0f8ba158f43b10b (patch)
tree9de97fe1186b099fc54d6f428562a6cf8da3ae6d
parent0ce687634fa5e0d955e896a0d0d5f584a4cfd1a4 (diff)
Xi: byte-swap device property requests.
-rw-r--r--Xi/xiproperty.c44
1 files 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));
}