(submit/fixup-req-len) Xi: drop swapping request length fields

The request struct's length fields aren't used anymore - we have the
client->req_len field instead, which also is bigreq-compatible.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2024-08-06 17:02:20 +02:00
parent 3a923b9408
commit 0d4051e3c7
54 changed files with 43 additions and 88 deletions

View File

@ -74,7 +74,6 @@ int _X_COLD
SProcXAllowDeviceEvents(ClientPtr client) SProcXAllowDeviceEvents(ClientPtr client)
{ {
REQUEST(xAllowDeviceEventsReq); REQUEST(xAllowDeviceEventsReq);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xAllowDeviceEventsReq); REQUEST_SIZE_MATCH(xAllowDeviceEventsReq);
swapl(&stuff->time); swapl(&stuff->time);
return (ProcXAllowDeviceEvents(client)); return (ProcXAllowDeviceEvents(client));

View File

@ -77,7 +77,6 @@ SProcXChangeDeviceControl(ClientPtr client)
xDeviceCtl *ctl; xDeviceCtl *ctl;
REQUEST(xChangeDeviceControlReq); REQUEST(xChangeDeviceControlReq);
swaps(&stuff->length);
REQUEST_AT_LEAST_EXTRA_SIZE(xChangeDeviceControlReq, sizeof(xDeviceCtl)); REQUEST_AT_LEAST_EXTRA_SIZE(xChangeDeviceControlReq, sizeof(xDeviceCtl));
swaps(&stuff->control); swaps(&stuff->control);
ctl = (xDeviceCtl *) &stuff[1]; ctl = (xDeviceCtl *) &stuff[1];

View File

@ -75,7 +75,6 @@ int _X_COLD
SProcXChangeFeedbackControl(ClientPtr client) SProcXChangeFeedbackControl(ClientPtr client)
{ {
REQUEST(xChangeFeedbackControlReq); REQUEST(xChangeFeedbackControlReq);
swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xChangeFeedbackControlReq); REQUEST_AT_LEAST_SIZE(xChangeFeedbackControlReq);
swapl(&stuff->mask); swapl(&stuff->mask);
return (ProcXChangeFeedbackControl(client)); return (ProcXChangeFeedbackControl(client));

View File

@ -75,9 +75,6 @@ SOFTWARE.
int _X_COLD int _X_COLD
SProcXChangeKeyboardDevice(ClientPtr client) SProcXChangeKeyboardDevice(ClientPtr client)
{ {
REQUEST(xChangeKeyboardDeviceReq);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xChangeKeyboardDeviceReq);
return (ProcXChangeKeyboardDevice(client)); return (ProcXChangeKeyboardDevice(client));
} }

View File

@ -77,7 +77,6 @@ SProcXChangeDeviceKeyMapping(ClientPtr client)
unsigned int count; unsigned int count;
REQUEST(xChangeDeviceKeyMappingReq); REQUEST(xChangeDeviceKeyMappingReq);
swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xChangeDeviceKeyMappingReq); REQUEST_AT_LEAST_SIZE(xChangeDeviceKeyMappingReq);
count = stuff->keyCodes * stuff->keySymsPerKeyCode; count = stuff->keyCodes * stuff->keySymsPerKeyCode;
REQUEST_FIXED_SIZE(xChangeDeviceKeyMappingReq, count * sizeof(CARD32)); REQUEST_FIXED_SIZE(xChangeDeviceKeyMappingReq, count * sizeof(CARD32));

View File

@ -77,7 +77,6 @@ int _X_COLD
SProcXChangeDeviceDontPropagateList(ClientPtr client) SProcXChangeDeviceDontPropagateList(ClientPtr client)
{ {
REQUEST(xChangeDeviceDontPropagateListReq); REQUEST(xChangeDeviceDontPropagateListReq);
swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xChangeDeviceDontPropagateListReq); REQUEST_AT_LEAST_SIZE(xChangeDeviceDontPropagateListReq);
swapl(&stuff->window); swapl(&stuff->window);
swaps(&stuff->count); swaps(&stuff->count);

View File

@ -77,9 +77,6 @@ SOFTWARE.
int _X_COLD int _X_COLD
SProcXChangePointerDevice(ClientPtr client) SProcXChangePointerDevice(ClientPtr client)
{ {
REQUEST(xChangePointerDeviceReq);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xChangePointerDeviceReq);
return (ProcXChangePointerDevice(client)); return (ProcXChangePointerDevice(client));
} }

View File

@ -73,9 +73,6 @@ SOFTWARE.
int _X_COLD int _X_COLD
SProcXCloseDevice(ClientPtr client) SProcXCloseDevice(ClientPtr client)
{ {
REQUEST(xCloseDeviceReq);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xCloseDeviceReq);
return (ProcXCloseDevice(client)); return (ProcXCloseDevice(client));
} }

View File

@ -71,8 +71,6 @@ SOFTWARE.
int _X_COLD int _X_COLD
SProcXDeviceBell(ClientPtr client) SProcXDeviceBell(ClientPtr client)
{ {
REQUEST(xDeviceBellReq);
swaps(&stuff->length);
return (ProcXDeviceBell(client)); return (ProcXDeviceBell(client));
} }

View File

@ -70,8 +70,6 @@ SOFTWARE.
int _X_COLD int _X_COLD
SProcXGetDeviceButtonMapping(ClientPtr client) SProcXGetDeviceButtonMapping(ClientPtr client)
{ {
REQUEST(xGetDeviceButtonMappingReq);
swaps(&stuff->length);
return (ProcXGetDeviceButtonMapping(client)); return (ProcXGetDeviceButtonMapping(client));
} }

View File

@ -72,7 +72,6 @@ int _X_COLD
SProcXGetDeviceControl(ClientPtr client) SProcXGetDeviceControl(ClientPtr client)
{ {
REQUEST(xGetDeviceControlReq); REQUEST(xGetDeviceControlReq);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xGetDeviceControlReq); REQUEST_SIZE_MATCH(xGetDeviceControlReq);
swaps(&stuff->control); swaps(&stuff->control);
return (ProcXGetDeviceControl(client)); return (ProcXGetDeviceControl(client));

View File

@ -71,8 +71,6 @@ SOFTWARE.
int _X_COLD int _X_COLD
SProcXGetFeedbackControl(ClientPtr client) SProcXGetFeedbackControl(ClientPtr client)
{ {
REQUEST(xGetFeedbackControlReq);
swaps(&stuff->length);
return (ProcXGetFeedbackControl(client)); return (ProcXGetFeedbackControl(client));
} }

View File

@ -71,8 +71,6 @@ SOFTWARE.
int _X_COLD int _X_COLD
SProcXGetDeviceFocus(ClientPtr client) SProcXGetDeviceFocus(ClientPtr client)
{ {
REQUEST(xGetDeviceFocusReq);
swaps(&stuff->length);
return (ProcXGetDeviceFocus(client)); return (ProcXGetDeviceFocus(client));
} }

View File

@ -74,8 +74,6 @@ SOFTWARE.
int _X_COLD int _X_COLD
SProcXGetDeviceKeyMapping(ClientPtr client) SProcXGetDeviceKeyMapping(ClientPtr client)
{ {
REQUEST(xGetDeviceKeyMappingReq);
swaps(&stuff->length);
return (ProcXGetDeviceKeyMapping(client)); return (ProcXGetDeviceKeyMapping(client));
} }

View File

@ -71,8 +71,6 @@ SOFTWARE.
int _X_COLD int _X_COLD
SProcXGetDeviceModifierMapping(ClientPtr client) SProcXGetDeviceModifierMapping(ClientPtr client)
{ {
REQUEST(xGetDeviceModifierMappingReq);
swaps(&stuff->length);
return (ProcXGetDeviceModifierMapping(client)); return (ProcXGetDeviceModifierMapping(client));
} }

View File

@ -78,7 +78,6 @@ int _X_COLD
SProcXGetDeviceDontPropagateList(ClientPtr client) SProcXGetDeviceDontPropagateList(ClientPtr client)
{ {
REQUEST(xGetDeviceDontPropagateListReq); REQUEST(xGetDeviceDontPropagateListReq);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xGetDeviceDontPropagateListReq); REQUEST_SIZE_MATCH(xGetDeviceDontPropagateListReq);
swapl(&stuff->window); swapl(&stuff->window);
return (ProcXGetDeviceDontPropagateList(client)); return (ProcXGetDeviceDontPropagateList(client));

View File

@ -76,7 +76,6 @@ int _X_COLD
SProcXGetSelectedExtensionEvents(ClientPtr client) SProcXGetSelectedExtensionEvents(ClientPtr client)
{ {
REQUEST(xGetSelectedExtensionEventsReq); REQUEST(xGetSelectedExtensionEventsReq);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xGetSelectedExtensionEventsReq); REQUEST_SIZE_MATCH(xGetSelectedExtensionEventsReq);
swapl(&stuff->window); swapl(&stuff->window);
return (ProcXGetSelectedExtensionEvents(client)); return (ProcXGetSelectedExtensionEvents(client));

View File

@ -74,7 +74,6 @@ int _X_COLD
SProcXGetExtensionVersion(ClientPtr client) SProcXGetExtensionVersion(ClientPtr client)
{ {
REQUEST(xGetExtensionVersionReq); REQUEST(xGetExtensionVersionReq);
swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xGetExtensionVersionReq); REQUEST_AT_LEAST_SIZE(xGetExtensionVersionReq);
swaps(&stuff->nbytes); swaps(&stuff->nbytes);
return (ProcXGetExtensionVersion(client)); return (ProcXGetExtensionVersion(client));

View File

@ -78,7 +78,6 @@ int _X_COLD
SProcXGrabDevice(ClientPtr client) SProcXGrabDevice(ClientPtr client)
{ {
REQUEST(xGrabDeviceReq); REQUEST(xGrabDeviceReq);
swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xGrabDeviceReq); REQUEST_AT_LEAST_SIZE(xGrabDeviceReq);
swapl(&stuff->grabWindow); swapl(&stuff->grabWindow);
swapl(&stuff->time); swapl(&stuff->time);

View File

@ -76,7 +76,6 @@ int _X_COLD
SProcXGrabDeviceButton(ClientPtr client) SProcXGrabDeviceButton(ClientPtr client)
{ {
REQUEST(xGrabDeviceButtonReq); REQUEST(xGrabDeviceButtonReq);
swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xGrabDeviceButtonReq); REQUEST_AT_LEAST_SIZE(xGrabDeviceButtonReq);
swapl(&stuff->grabWindow); swapl(&stuff->grabWindow);
swaps(&stuff->modifiers); swaps(&stuff->modifiers);

View File

@ -76,7 +76,6 @@ int _X_COLD
SProcXGrabDeviceKey(ClientPtr client) SProcXGrabDeviceKey(ClientPtr client)
{ {
REQUEST(xGrabDeviceKeyReq); REQUEST(xGrabDeviceKeyReq);
swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xGrabDeviceKeyReq); REQUEST_AT_LEAST_SIZE(xGrabDeviceKeyReq);
swapl(&stuff->grabWindow); swapl(&stuff->grabWindow);
swaps(&stuff->modifiers); swaps(&stuff->modifiers);

View File

@ -73,7 +73,6 @@ int _X_COLD
SProcXGetDeviceMotionEvents(ClientPtr client) SProcXGetDeviceMotionEvents(ClientPtr client)
{ {
REQUEST(xGetDeviceMotionEventsReq); REQUEST(xGetDeviceMotionEventsReq);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xGetDeviceMotionEventsReq); REQUEST_SIZE_MATCH(xGetDeviceMotionEventsReq);
swapl(&stuff->start); swapl(&stuff->start);
swapl(&stuff->stop); swapl(&stuff->stop);

View File

@ -77,8 +77,6 @@ SOFTWARE.
int _X_COLD int _X_COLD
SProcXListInputDevices(ClientPtr client) SProcXListInputDevices(ClientPtr client)
{ {
REQUEST(xListInputDevicesReq);
swaps(&stuff->length);
return (ProcXListInputDevices(client)); return (ProcXListInputDevices(client));
} }

View File

@ -76,8 +76,6 @@ extern CARD8 event_base[];
int _X_COLD int _X_COLD
SProcXOpenDevice(ClientPtr client) SProcXOpenDevice(ClientPtr client)
{ {
REQUEST(xOpenDeviceReq);
swaps(&stuff->length);
return (ProcXOpenDevice(client)); return (ProcXOpenDevice(client));
} }

View File

@ -57,8 +57,6 @@ from The Open Group.
int _X_COLD int _X_COLD
SProcXQueryDeviceState(ClientPtr client) SProcXQueryDeviceState(ClientPtr client)
{ {
REQUEST(xQueryDeviceStateReq);
swaps(&stuff->length);
return (ProcXQueryDeviceState(client)); return (ProcXQueryDeviceState(client));
} }

View File

@ -123,7 +123,6 @@ int _X_COLD
SProcXSelectExtensionEvent(ClientPtr client) SProcXSelectExtensionEvent(ClientPtr client)
{ {
REQUEST(xSelectExtensionEventReq); REQUEST(xSelectExtensionEventReq);
swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xSelectExtensionEventReq); REQUEST_AT_LEAST_SIZE(xSelectExtensionEventReq);
swapl(&stuff->window); swapl(&stuff->window);
swaps(&stuff->count); swaps(&stuff->count);

View File

@ -84,7 +84,6 @@ SProcXSendExtensionEvent(ClientPtr client)
EventSwapPtr proc; EventSwapPtr proc;
REQUEST(xSendExtensionEventReq); REQUEST(xSendExtensionEventReq);
swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xSendExtensionEventReq); REQUEST_AT_LEAST_SIZE(xSendExtensionEventReq);
swapl(&stuff->destination); swapl(&stuff->destination);
swaps(&stuff->count); swaps(&stuff->count);

View File

@ -71,8 +71,6 @@ SOFTWARE.
int _X_COLD int _X_COLD
SProcXSetDeviceButtonMapping(ClientPtr client) SProcXSetDeviceButtonMapping(ClientPtr client)
{ {
REQUEST(xSetDeviceButtonMappingReq);
swaps(&stuff->length);
return (ProcXSetDeviceButtonMapping(client)); return (ProcXSetDeviceButtonMapping(client));
} }

View File

@ -71,8 +71,6 @@ SOFTWARE.
int _X_COLD int _X_COLD
SProcXSetDeviceValuators(ClientPtr client) SProcXSetDeviceValuators(ClientPtr client)
{ {
REQUEST(xSetDeviceValuatorsReq);
swaps(&stuff->length);
return (ProcXSetDeviceValuators(client)); return (ProcXSetDeviceValuators(client));
} }

View File

@ -76,7 +76,6 @@ int _X_COLD
SProcXSetDeviceFocus(ClientPtr client) SProcXSetDeviceFocus(ClientPtr client)
{ {
REQUEST(xSetDeviceFocusReq); REQUEST(xSetDeviceFocusReq);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xSetDeviceFocusReq); REQUEST_SIZE_MATCH(xSetDeviceFocusReq);
swapl(&stuff->focus); swapl(&stuff->focus);
swapl(&stuff->time); swapl(&stuff->time);

View File

@ -73,8 +73,6 @@ SOFTWARE.
int _X_COLD int _X_COLD
SProcXSetDeviceModifierMapping(ClientPtr client) SProcXSetDeviceModifierMapping(ClientPtr client)
{ {
REQUEST(xSetDeviceModifierMappingReq);
swaps(&stuff->length);
return (ProcXSetDeviceModifierMapping(client)); return (ProcXSetDeviceModifierMapping(client));
} }

View File

@ -71,8 +71,6 @@ SOFTWARE.
int _X_COLD int _X_COLD
SProcXSetDeviceMode(ClientPtr client) SProcXSetDeviceMode(ClientPtr client)
{ {
REQUEST(xSetDeviceModeReq);
swaps(&stuff->length);
return (ProcXSetDeviceMode(client)); return (ProcXSetDeviceMode(client));
} }

View File

@ -71,7 +71,6 @@ int _X_COLD
SProcXUngrabDevice(ClientPtr client) SProcXUngrabDevice(ClientPtr client)
{ {
REQUEST(xUngrabDeviceReq); REQUEST(xUngrabDeviceReq);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xUngrabDeviceReq); REQUEST_SIZE_MATCH(xUngrabDeviceReq);
swapl(&stuff->time); swapl(&stuff->time);
return (ProcXUngrabDevice(client)); return (ProcXUngrabDevice(client));

View File

@ -79,7 +79,6 @@ int _X_COLD
SProcXUngrabDeviceButton(ClientPtr client) SProcXUngrabDeviceButton(ClientPtr client)
{ {
REQUEST(xUngrabDeviceButtonReq); REQUEST(xUngrabDeviceButtonReq);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xUngrabDeviceButtonReq); REQUEST_SIZE_MATCH(xUngrabDeviceButtonReq);
swapl(&stuff->grabWindow); swapl(&stuff->grabWindow);
swaps(&stuff->modifiers); swaps(&stuff->modifiers);

View File

@ -81,7 +81,6 @@ int _X_COLD
SProcXUngrabDeviceKey(ClientPtr client) SProcXUngrabDeviceKey(ClientPtr client)
{ {
REQUEST(xUngrabDeviceKeyReq); REQUEST(xUngrabDeviceKeyReq);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xUngrabDeviceKeyReq); REQUEST_SIZE_MATCH(xUngrabDeviceKeyReq);
swapl(&stuff->grabWindow); swapl(&stuff->grabWindow);
swaps(&stuff->modifiers); swaps(&stuff->modifiers);

View File

@ -52,7 +52,6 @@ SProcXIAllowEvents(ClientPtr client)
REQUEST(xXIAllowEventsReq); REQUEST(xXIAllowEventsReq);
REQUEST_AT_LEAST_SIZE(xXIAllowEventsReq); REQUEST_AT_LEAST_SIZE(xXIAllowEventsReq);
swaps(&stuff->length);
swaps(&stuff->deviceid); swaps(&stuff->deviceid);
swapl(&stuff->time); swapl(&stuff->time);
if (client->req_len > 3) { if (client->req_len > 3) {

View File

@ -842,7 +842,6 @@ SProcXIBarrierReleasePointer(ClientPtr client)
REQUEST(xXIBarrierReleasePointerReq); REQUEST(xXIBarrierReleasePointerReq);
int i; int i;
swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xXIBarrierReleasePointerReq); REQUEST_AT_LEAST_SIZE(xXIBarrierReleasePointerReq);
swapl(&stuff->num_barriers); swapl(&stuff->num_barriers);

View File

@ -60,7 +60,6 @@ SProcXIChangeCursor(ClientPtr client)
{ {
REQUEST(xXIChangeCursorReq); REQUEST(xXIChangeCursorReq);
REQUEST_SIZE_MATCH(xXIChangeCursorReq); REQUEST_SIZE_MATCH(xXIChangeCursorReq);
swaps(&stuff->length);
swapl(&stuff->win); swapl(&stuff->win);
swapl(&stuff->cursor); swapl(&stuff->cursor);
swaps(&stuff->deviceid); swaps(&stuff->deviceid);

View File

@ -131,8 +131,6 @@ XISendDeviceHierarchyEvent(int flags[MAXDEVICES])
int _X_COLD int _X_COLD
SProcXIChangeHierarchy(ClientPtr client) SProcXIChangeHierarchy(ClientPtr client)
{ {
REQUEST(xXIChangeHierarchyReq);
swaps(&stuff->length);
return (ProcXIChangeHierarchy(client)); return (ProcXIChangeHierarchy(client));
} }

View File

@ -54,7 +54,6 @@ SProcXIGetClientPointer(ClientPtr client)
REQUEST(xXIGetClientPointerReq); REQUEST(xXIGetClientPointerReq);
REQUEST_SIZE_MATCH(xXIGetClientPointerReq); REQUEST_SIZE_MATCH(xXIGetClientPointerReq);
swaps(&stuff->length);
swapl(&stuff->win); swapl(&stuff->win);
return ProcXIGetClientPointer(client); return ProcXIGetClientPointer(client);
} }

View File

@ -55,7 +55,6 @@ SProcXIGrabDevice(ClientPtr client)
*/ */
REQUEST_AT_LEAST_SIZE(xXIGrabDeviceReq); REQUEST_AT_LEAST_SIZE(xXIGrabDeviceReq);
swaps(&stuff->length);
swaps(&stuff->deviceid); swaps(&stuff->deviceid);
swapl(&stuff->grab_window); swapl(&stuff->grab_window);
swapl(&stuff->cursor); swapl(&stuff->cursor);
@ -140,7 +139,6 @@ SProcXIUngrabDevice(ClientPtr client)
REQUEST(xXIUngrabDeviceReq); REQUEST(xXIUngrabDeviceReq);
REQUEST_SIZE_MATCH(xXIUngrabDeviceReq); REQUEST_SIZE_MATCH(xXIUngrabDeviceReq);
swaps(&stuff->length);
swaps(&stuff->deviceid); swaps(&stuff->deviceid);
swapl(&stuff->time); swapl(&stuff->time);

View File

@ -57,7 +57,6 @@ SProcXIPassiveGrabDevice(ClientPtr client)
REQUEST(xXIPassiveGrabDeviceReq); REQUEST(xXIPassiveGrabDeviceReq);
REQUEST_AT_LEAST_SIZE(xXIPassiveGrabDeviceReq); REQUEST_AT_LEAST_SIZE(xXIPassiveGrabDeviceReq);
swaps(&stuff->length);
swaps(&stuff->deviceid); swaps(&stuff->deviceid);
swapl(&stuff->grab_window); swapl(&stuff->grab_window);
swapl(&stuff->cursor); swapl(&stuff->cursor);
@ -282,7 +281,6 @@ SProcXIPassiveUngrabDevice(ClientPtr client)
REQUEST(xXIPassiveUngrabDeviceReq); REQUEST(xXIPassiveUngrabDeviceReq);
REQUEST_AT_LEAST_SIZE(xXIPassiveUngrabDeviceReq); REQUEST_AT_LEAST_SIZE(xXIPassiveUngrabDeviceReq);
swaps(&stuff->length);
swapl(&stuff->grab_window); swapl(&stuff->grab_window);
swaps(&stuff->deviceid); swaps(&stuff->deviceid);
swapl(&stuff->detail); swapl(&stuff->detail);

View File

@ -1017,10 +1017,6 @@ ProcXGetDeviceProperty(ClientPtr client)
int _X_COLD int _X_COLD
SProcXListDeviceProperties(ClientPtr client) SProcXListDeviceProperties(ClientPtr client)
{ {
REQUEST(xListDevicePropertiesReq);
REQUEST_SIZE_MATCH(xListDevicePropertiesReq);
swaps(&stuff->length);
return (ProcXListDeviceProperties(client)); return (ProcXListDeviceProperties(client));
} }
@ -1030,7 +1026,6 @@ SProcXChangeDeviceProperty(ClientPtr client)
REQUEST(xChangeDevicePropertyReq); REQUEST(xChangeDevicePropertyReq);
REQUEST_AT_LEAST_SIZE(xChangeDevicePropertyReq); REQUEST_AT_LEAST_SIZE(xChangeDevicePropertyReq);
swaps(&stuff->length);
swapl(&stuff->property); swapl(&stuff->property);
swapl(&stuff->type); swapl(&stuff->type);
swapl(&stuff->nUnits); swapl(&stuff->nUnits);
@ -1043,7 +1038,6 @@ SProcXDeleteDeviceProperty(ClientPtr client)
REQUEST(xDeleteDevicePropertyReq); REQUEST(xDeleteDevicePropertyReq);
REQUEST_SIZE_MATCH(xDeleteDevicePropertyReq); REQUEST_SIZE_MATCH(xDeleteDevicePropertyReq);
swaps(&stuff->length);
swapl(&stuff->property); swapl(&stuff->property);
return (ProcXDeleteDeviceProperty(client)); return (ProcXDeleteDeviceProperty(client));
} }
@ -1054,7 +1048,6 @@ SProcXGetDeviceProperty(ClientPtr client)
REQUEST(xGetDevicePropertyReq); REQUEST(xGetDevicePropertyReq);
REQUEST_SIZE_MATCH(xGetDevicePropertyReq); REQUEST_SIZE_MATCH(xGetDevicePropertyReq);
swaps(&stuff->length);
swapl(&stuff->property); swapl(&stuff->property);
swapl(&stuff->type); swapl(&stuff->type);
swapl(&stuff->longOffset); swapl(&stuff->longOffset);
@ -1262,7 +1255,6 @@ SProcXIListProperties(ClientPtr client)
REQUEST(xXIListPropertiesReq); REQUEST(xXIListPropertiesReq);
REQUEST_SIZE_MATCH(xXIListPropertiesReq); REQUEST_SIZE_MATCH(xXIListPropertiesReq);
swaps(&stuff->length);
swaps(&stuff->deviceid); swaps(&stuff->deviceid);
return (ProcXIListProperties(client)); return (ProcXIListProperties(client));
} }
@ -1273,7 +1265,6 @@ SProcXIChangeProperty(ClientPtr client)
REQUEST(xXIChangePropertyReq); REQUEST(xXIChangePropertyReq);
REQUEST_AT_LEAST_SIZE(xXIChangePropertyReq); REQUEST_AT_LEAST_SIZE(xXIChangePropertyReq);
swaps(&stuff->length);
swaps(&stuff->deviceid); swaps(&stuff->deviceid);
swapl(&stuff->property); swapl(&stuff->property);
swapl(&stuff->type); swapl(&stuff->type);
@ -1287,7 +1278,6 @@ SProcXIDeleteProperty(ClientPtr client)
REQUEST(xXIDeletePropertyReq); REQUEST(xXIDeletePropertyReq);
REQUEST_SIZE_MATCH(xXIDeletePropertyReq); REQUEST_SIZE_MATCH(xXIDeletePropertyReq);
swaps(&stuff->length);
swaps(&stuff->deviceid); swaps(&stuff->deviceid);
swapl(&stuff->property); swapl(&stuff->property);
return (ProcXIDeleteProperty(client)); return (ProcXIDeleteProperty(client));
@ -1299,7 +1289,6 @@ SProcXIGetProperty(ClientPtr client)
REQUEST(xXIGetPropertyReq); REQUEST(xXIGetPropertyReq);
REQUEST_SIZE_MATCH(xXIGetPropertyReq); REQUEST_SIZE_MATCH(xXIGetPropertyReq);
swaps(&stuff->length);
swaps(&stuff->deviceid); swaps(&stuff->deviceid);
swapl(&stuff->property); swapl(&stuff->property);
swapl(&stuff->type); swapl(&stuff->type);

View File

@ -59,7 +59,6 @@ SProcXIQueryDevice(ClientPtr client)
REQUEST(xXIQueryDeviceReq); REQUEST(xXIQueryDeviceReq);
REQUEST_SIZE_MATCH(xXIQueryDeviceReq); REQUEST_SIZE_MATCH(xXIQueryDeviceReq);
swaps(&stuff->length);
swaps(&stuff->deviceid); swaps(&stuff->deviceid);
return ProcXIQueryDevice(client); return ProcXIQueryDevice(client);

View File

@ -68,7 +68,6 @@ SProcXIQueryPointer(ClientPtr client)
REQUEST(xXIQueryPointerReq); REQUEST(xXIQueryPointerReq);
REQUEST_SIZE_MATCH(xXIQueryPointerReq); REQUEST_SIZE_MATCH(xXIQueryPointerReq);
swaps(&stuff->length);
swaps(&stuff->deviceid); swaps(&stuff->deviceid);
swapl(&stuff->win); swapl(&stuff->win);
return (ProcXIQueryPointer(client)); return (ProcXIQueryPointer(client));

View File

@ -135,7 +135,6 @@ int _X_COLD
SProcXIQueryVersion(ClientPtr client) SProcXIQueryVersion(ClientPtr client)
{ {
REQUEST(xXIQueryVersionReq); REQUEST(xXIQueryVersionReq);
swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xXIQueryVersionReq); REQUEST_AT_LEAST_SIZE(xXIQueryVersionReq);
swaps(&stuff->major_version); swaps(&stuff->major_version);
swaps(&stuff->minor_version); swaps(&stuff->minor_version);

View File

@ -122,7 +122,6 @@ SProcXISelectEvents(ClientPtr client)
xXIEventMask *evmask; xXIEventMask *evmask;
REQUEST(xXISelectEventsReq); REQUEST(xXISelectEventsReq);
swaps(&stuff->length);
REQUEST_AT_LEAST_SIZE(xXISelectEventsReq); REQUEST_AT_LEAST_SIZE(xXISelectEventsReq);
swapl(&stuff->win); swapl(&stuff->win);
swaps(&stuff->num_masks); swaps(&stuff->num_masks);
@ -333,7 +332,6 @@ int _X_COLD
SProcXIGetSelectedEvents(ClientPtr client) SProcXIGetSelectedEvents(ClientPtr client)
{ {
REQUEST(xXIGetSelectedEventsReq); REQUEST(xXIGetSelectedEventsReq);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xXIGetSelectedEventsReq); REQUEST_SIZE_MATCH(xXIGetSelectedEventsReq);
swapl(&stuff->win); swapl(&stuff->win);

View File

@ -55,7 +55,6 @@ SProcXISetClientPointer(ClientPtr client)
REQUEST(xXISetClientPointerReq); REQUEST(xXISetClientPointerReq);
REQUEST_SIZE_MATCH(xXISetClientPointerReq); REQUEST_SIZE_MATCH(xXISetClientPointerReq);
swaps(&stuff->length);
swapl(&stuff->win); swapl(&stuff->win);
swaps(&stuff->deviceid); swaps(&stuff->deviceid);
return (ProcXISetClientPointer(client)); return (ProcXISetClientPointer(client));

View File

@ -48,7 +48,6 @@ SProcXISetFocus(ClientPtr client)
REQUEST(xXISetFocusReq); REQUEST(xXISetFocusReq);
REQUEST_AT_LEAST_SIZE(xXISetFocusReq); REQUEST_AT_LEAST_SIZE(xXISetFocusReq);
swaps(&stuff->length);
swaps(&stuff->deviceid); swaps(&stuff->deviceid);
swapl(&stuff->focus); swapl(&stuff->focus);
swapl(&stuff->time); swapl(&stuff->time);
@ -62,7 +61,6 @@ SProcXIGetFocus(ClientPtr client)
REQUEST(xXIGetFocusReq); REQUEST(xXIGetFocusReq);
REQUEST_AT_LEAST_SIZE(xXIGetFocusReq); REQUEST_AT_LEAST_SIZE(xXIGetFocusReq);
swaps(&stuff->length);
swaps(&stuff->deviceid); swaps(&stuff->deviceid);
return ProcXIGetFocus(client); return ProcXIGetFocus(client);

View File

@ -61,7 +61,6 @@ SProcXIWarpPointer(ClientPtr client)
REQUEST(xXIWarpPointerReq); REQUEST(xXIWarpPointerReq);
REQUEST_SIZE_MATCH(xXIWarpPointerReq); REQUEST_SIZE_MATCH(xXIWarpPointerReq);
swaps(&stuff->length);
swapl(&stuff->src_win); swapl(&stuff->src_win);
swapl(&stuff->dst_win); swapl(&stuff->dst_win);
swapl(&stuff->src_x); swapl(&stuff->src_x);

View File

@ -141,8 +141,18 @@ request_XIGetSelectedEvents(xXIGetSelectedEventsReq * req, int error)
wrapped_WriteToClient = reply_XIGetSelectedEvents; wrapped_WriteToClient = reply_XIGetSelectedEvents;
client.swapped = TRUE; client.swapped = TRUE;
/* MUST NOT swap req->length here !
The handler proc's don't use that field anymore, thus also SProc's
wont swap it. But this test program uses that field to initialize
client->req_len (see above). We previously had to swap it here, so
that SProcXIPassiveGrabDevice() will swap it back. Since that's gone
now, still swapping itself would break if this function is called
again and writing back a errornously swapped value
*/
swapl(&req->win); swapl(&req->win);
swaps(&req->length);
rc = SProcXIGetSelectedEvents(&client); rc = SProcXIGetSelectedEvents(&client);
assert(rc == error); assert(rc == error);
} }

View File

@ -146,7 +146,17 @@ request_XIPassiveGrabDevice(ClientPtr client, xXIPassiveGrabDeviceReq * req,
assert(client_request.errorValue == errval); assert(client_request.errorValue == errval);
client_request.swapped = TRUE; client_request.swapped = TRUE;
swaps(&req->length);
/* MUST NOT swap req->length here !
The handler proc's don't use that field anymore, thus also SProc's
wont swap it. But this test program uses that field to initialize
client->req_len (see above). We previously had to swap it here, so
that SProcXIPassiveGrabDevice() will swap it back. Since that's gone
now, still swapping itself would break if this function is called
again and writing back a errornously swapped value
*/
swapl(&req->time); swapl(&req->time);
swapl(&req->grab_window); swapl(&req->grab_window);
swapl(&req->cursor); swapl(&req->cursor);

View File

@ -109,8 +109,17 @@ request_XISelectEvent(xXISelectEventsReq * req, int error)
mask = next; mask = next;
} }
/* MUST NOT swap req->length here !
The handler proc's don't use that field anymore, thus also SProc's
wont swap it. But this test program uses that field to initialize
client->req_len (see above). We previously had to swap it here, so
that SProcXIPassiveGrabDevice() will swap it back. Since that's gone
now, still swapping itself would break if this function is called
again and writing back a errornously swapped value
*/
swapl(&req->win); swapl(&req->win);
swaps(&req->length);
swaps(&req->num_masks); swaps(&req->num_masks);
rc = SProcXISelectEvents(&client); rc = SProcXISelectEvents(&client);
assert(rc == error); assert(rc == error);

View File

@ -68,8 +68,18 @@ request_XISetClientPointer(xXISetClientPointerReq * req, int error)
assert(client_request.errorValue == req->deviceid); assert(client_request.errorValue == req->deviceid);
client_request.swapped = TRUE; client_request.swapped = TRUE;
/* MUST NOT swap req->length here !
The handler proc's don't use that field anymore, thus also SProc's
wont swap it. But this test program uses that field to initialize
client->req_len (see above). We previously had to swap it here, so
that SProcXIPassiveGrabDevice() will swap it back. Since that's gone
now, still swapping itself would break if this function is called
again and writing back a errornously swapped value
*/
swapl(&req->win); swapl(&req->win);
swaps(&req->length);
swaps(&req->deviceid); swaps(&req->deviceid);
rc = SProcXISetClientPointer(&client_request); rc = SProcXISetClientPointer(&client_request);
assert(rc == error); assert(rc == error);