diff --git a/dix/property.c b/dix/property.c index d5538e467..f22900cbe 100644 --- a/dix/property.c +++ b/dix/property.c @@ -574,7 +574,6 @@ int ProcListProperties(ClientPtr client) { Atom *pAtoms = NULL, *temppAtoms; - xListPropertiesReply xlpr; int rc, numProps = 0; WindowPtr pWin; PropertyPtr pProp, realProp; @@ -606,18 +605,24 @@ ProcListProperties(ClientPtr client) } } - xlpr = (xListPropertiesReply) { + xListPropertiesReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = bytes_to_int32(numProps * sizeof(Atom)), .nProperties = numProps }; - WriteReplyToClient(client, sizeof(xGenericReply), &xlpr); - if (numProps) { - client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; - WriteSwappedDataToClient(client, numProps * sizeof(Atom), pAtoms); - free(pAtoms); + + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swaps(&rep.nProperties); + SwapLongs(pAtoms, numProps); } + + WriteToClient(client, sizeof(rep), &rep); + WriteToClient(client, numProps * sizeof(Atom), pAtoms); + free(pAtoms); + return Success; } diff --git a/dix/swaprep.c b/dix/swaprep.c index 230f2e1cf..77897bfec 100644 --- a/dix/swaprep.c +++ b/dix/swaprep.c @@ -181,15 +181,6 @@ SGenericReply(ClientPtr pClient, int size, xGenericReply * pRep) WriteToClient(pClient, size, pRep); } -void _X_COLD -SListPropertiesReply(ClientPtr pClient, int size, xListPropertiesReply * pRep) -{ - swaps(&pRep->sequenceNumber); - swapl(&pRep->length); - swaps(&pRep->nProperties); - WriteToClient(pClient, size, pRep); -} - static void _X_COLD SwapTimecoord(xTimecoord * pCoord) { diff --git a/dix/tables.c b/dix/tables.c index 8e582fe13..2c096c317 100644 --- a/dix/tables.c +++ b/dix/tables.c @@ -736,7 +736,7 @@ ReplySwapPtr ReplySwapVector[256] = { ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, /* 20 */ - (ReplySwapPtr) SListPropertiesReply, + ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, diff --git a/include/swaprep.h b/include/swaprep.h index ec94b89a7..c0f167b0d 100644 --- a/include/swaprep.h +++ b/include/swaprep.h @@ -44,9 +44,6 @@ extern void SGenericReply(ClientPtr /* pClient */ , int /* size */ , xGenericReply * /* pRep */ ); -extern void SListPropertiesReply(ClientPtr /* pClient */ , - int /* size */ , - xListPropertiesReply * /* pRep */ ); extern void SwapTimeCoordWrite(ClientPtr /* pClient */ , int /* size */ , xTimecoord * /* pRep */ );