Xi: byte-swap device property requests.

This commit is contained in:
Peter Hutterer 2008-08-13 14:24:45 +09:30
parent 0ce687634f
commit e6813e8de6

View File

@ -519,6 +519,7 @@ ProcXListDeviceProperties (ClientPtr client)
int n; int n;
swaps (&rep.sequenceNumber, n); swaps (&rep.sequenceNumber, n);
swapl (&rep.length, n); swapl (&rep.length, n);
swaps (&rep.nAtoms, n);
} }
temppAtoms = pAtoms; temppAtoms = pAtoms;
for (prop = dev->properties.properties; prop; prop = prop->next) for (prop = dev->properties.properties; prop; prop = prop->next)
@ -823,60 +824,79 @@ ProcXGetDeviceProperty (ClientPtr client)
int int
SProcXListDeviceProperties (ClientPtr client) SProcXListDeviceProperties (ClientPtr client)
{ {
char n;
REQUEST(xListDevicePropertiesReq); REQUEST(xListDevicePropertiesReq);
swaps(&stuff->length, n);
REQUEST_SIZE_MATCH(xListDevicePropertiesReq); REQUEST_SIZE_MATCH(xListDevicePropertiesReq);
(void) stuff; return (ProcXListDeviceProperties(client));
return BadImplementation;
} }
int int
SProcXQueryDeviceProperty (ClientPtr client) SProcXQueryDeviceProperty (ClientPtr client)
{ {
char n;
REQUEST(xQueryDevicePropertyReq); REQUEST(xQueryDevicePropertyReq);
swaps(&stuff->length, n);
swapl(&stuff->property, n);
REQUEST_SIZE_MATCH(xQueryDevicePropertyReq); REQUEST_SIZE_MATCH(xQueryDevicePropertyReq);
(void) stuff; return (ProcXQueryDeviceProperty(client));
return BadImplementation;
} }
int int
SProcXConfigureDeviceProperty (ClientPtr client) SProcXConfigureDeviceProperty (ClientPtr client)
{ {
char n;
REQUEST(xConfigureDevicePropertyReq); REQUEST(xConfigureDevicePropertyReq);
swaps(&stuff->length, n);
swapl(&stuff->property, n);
REQUEST_SIZE_MATCH(xConfigureDevicePropertyReq); REQUEST_SIZE_MATCH(xConfigureDevicePropertyReq);
(void) stuff; return (ProcXConfigureDeviceProperty(client));
return BadImplementation;
} }
int int
SProcXChangeDeviceProperty (ClientPtr client) SProcXChangeDeviceProperty (ClientPtr client)
{ {
char n;
REQUEST(xChangeDevicePropertyReq); REQUEST(xChangeDevicePropertyReq);
swaps(&stuff->length, n);
swapl(&stuff->property, n);
swapl(&stuff->type, n);
swapl(&stuff->nUnits, n);
REQUEST_SIZE_MATCH(xChangeDevicePropertyReq); REQUEST_SIZE_MATCH(xChangeDevicePropertyReq);
(void) stuff; return (ProcXChangeDeviceProperty(client));
return BadImplementation;
} }
int int
SProcXDeleteDeviceProperty (ClientPtr client) SProcXDeleteDeviceProperty (ClientPtr client)
{ {
char n;
REQUEST(xDeleteDevicePropertyReq); REQUEST(xDeleteDevicePropertyReq);
swaps(&stuff->length, n);
swapl(&stuff->property, n);
REQUEST_SIZE_MATCH(xDeleteDevicePropertyReq); REQUEST_SIZE_MATCH(xDeleteDevicePropertyReq);
(void) stuff; return (ProcXDeleteDeviceProperty(client));
return BadImplementation;
} }
int int
SProcXGetDeviceProperty (ClientPtr client) SProcXGetDeviceProperty (ClientPtr client)
{ {
char n;
REQUEST(xGetDevicePropertyReq); 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); REQUEST_SIZE_MATCH(xGetDevicePropertyReq);
(void) stuff; return (ProcXGetDeviceProperty(client));
return BadImplementation;
} }