diff --git a/Xi/extinit.c b/Xi/extinit.c index 966911a6d..7a37a8ce7 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -421,9 +421,7 @@ SReplyIDispatch(ClientPtr client, int len, xGrabDeviceReply * rep) { /* All we look at is the type field */ /* This is common to all replies */ - if (rep->RepType == X_GetDeviceControl) - SRepXGetDeviceControl(client, len, (xGetDeviceControlReply *) rep); - else if (rep->RepType == X_ChangeDeviceControl) + if (rep->RepType == X_ChangeDeviceControl) SRepXChangeDeviceControl(client, len, (xChangeDeviceControlReply *) rep); else if (rep->RepType == X_ListDeviceProperties) diff --git a/Xi/getdctl.c b/Xi/getdctl.c index ba5097575..88462b767 100644 --- a/Xi/getdctl.c +++ b/Xi/getdctl.c @@ -143,21 +143,6 @@ CopySwapDeviceEnable(ClientPtr client, DeviceIntPtr dev, char *buf) } } -/*********************************************************************** - * - * This procedure writes the reply for the xGetDeviceControl function, - * if the client and server have a different byte ordering. - * - */ - -void _X_COLD -SRepXGetDeviceControl(ClientPtr client, int size, xGetDeviceControlReply * rep) -{ - swaps(&rep->sequenceNumber); - swapl(&rep->length); - WriteToClient(client, size, rep); -} - /*********************************************************************** * * Get the state of the specified device control. @@ -224,7 +209,11 @@ ProcXGetDeviceControl(ClientPtr client) .length = bytes_to_int32(total_length), }; - WriteReplyToClient(client, sizeof(xGetDeviceControlReply), &rep); + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + } + WriteToClient(client, sizeof(xGetDeviceControlReply), &rep); WriteToClient(client, total_length, savbuf); free(savbuf); return Success; diff --git a/Xi/getdctl.h b/Xi/getdctl.h index 7ca739264..430b75b1d 100644 --- a/Xi/getdctl.h +++ b/Xi/getdctl.h @@ -36,9 +36,4 @@ int SProcXGetDeviceControl(ClientPtr /* client */ int ProcXGetDeviceControl(ClientPtr /* client */ ); -void SRepXGetDeviceControl(ClientPtr /* client */ , - int /* size */ , - xGetDeviceControlReply * /* rep */ - ); - #endif /* GETDCTL_H */