diff --git a/Xi/extinit.c b/Xi/extinit.c index 9fa210c17..4a95c7e2a 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_GetFeedbackControl) - SRepXGetFeedbackControl(client, len, (xGetFeedbackControlReply *) rep); - else if (rep->RepType == X_GetDeviceKeyMapping) + if (rep->RepType == X_GetDeviceKeyMapping) SRepXGetDeviceKeyMapping(client, len, (xGetDeviceKeyMappingReply *) rep); else if (rep->RepType == X_GetDeviceModifierMapping) diff --git a/Xi/getfctl.c b/Xi/getfctl.c index f39a481fc..4ffb76226 100644 --- a/Xi/getfctl.c +++ b/Xi/getfctl.c @@ -234,23 +234,6 @@ CopySwapBellFeedback(ClientPtr client, BellFeedbackPtr b, char **buf) *buf += sizeof(xBellFeedbackState); } -/*********************************************************************** - * - * This procedure writes the reply for the xGetFeedbackControl function, - * if the client and server have a different byte ordering. - * - */ - -void _X_COLD -SRepXGetFeedbackControl(ClientPtr client, int size, - xGetFeedbackControlReply * rep) -{ - swaps(&rep->sequenceNumber); - swapl(&rep->length); - swaps(&rep->num_feedbacks); - WriteToClient(client, size, rep); -} - /*********************************************************************** * * Get the feedback control state. @@ -281,7 +264,6 @@ ProcXGetFeedbackControl(ClientPtr client) .repType = X_Reply, .RepType = X_GetFeedbackControl, .sequenceNumber = client->sequence, - .length = 0, .num_feedbacks = 0 }; @@ -333,7 +315,13 @@ ProcXGetFeedbackControl(ClientPtr client) CopySwapBellFeedback(client, b, &buf); rep.length = bytes_to_int32(total_length); - WriteReplyToClient(client, sizeof(xGetFeedbackControlReply), &rep); + + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swaps(&rep.num_feedbacks); + } + WriteToClient(client, sizeof(xGetFeedbackControlReply), &rep); WriteToClient(client, total_length, savbuf); free(savbuf); return Success; diff --git a/Xi/getfctl.h b/Xi/getfctl.h index 14944d28b..63083432e 100644 --- a/Xi/getfctl.h +++ b/Xi/getfctl.h @@ -33,9 +33,4 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. int ProcXGetFeedbackControl(ClientPtr /* client */ ); -void SRepXGetFeedbackControl(ClientPtr /* client */ , - int /* size */ , - xGetFeedbackControlReply * /* rep */ - ); - #endif /* GETFCTL_H */