diff --git a/dix/dispatch.c b/dix/dispatch.c index e759a2990..81508a6b2 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -2757,16 +2757,22 @@ ProcAllocColorCells(ClientPtr client) if (noPanoramiXExtension || !pcmp->pScreen->myNum) #endif /* XINERAMA */ { - xAllocColorCellsReply accr = { + xAllocColorCellsReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = bytes_to_int32(length), .nPixels = npixels, .nMasks = nmasks }; - WriteReplyToClient(client, sizeof(xAllocColorCellsReply), &accr); - client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; - WriteSwappedDataToClient(client, length, ppixels); + if (client->swapped) { + swaps(&rep.sequenceNumber); + swapl(&rep.length); + swaps(&rep.nPixels); + swaps(&rep.nMasks); + SwapLongs(ppixels, length / 4); + } + WriteToClient(client, sizeof(rep), &rep); + WriteToClient(client, length, ppixels); } free(ppixels); return Success; diff --git a/dix/swaprep.c b/dix/swaprep.c index d0b854061..88256721b 100644 --- a/dix/swaprep.c +++ b/dix/swaprep.c @@ -310,16 +310,6 @@ SGetFontPathReply(ClientPtr pClient, int size, xGetFontPathReply * pRep) WriteToClient(pClient, size, pRep); } -void _X_COLD -SAllocColorCellsReply(ClientPtr pClient, int size, xAllocColorCellsReply * pRep) -{ - swaps(&pRep->sequenceNumber); - swapl(&pRep->length); - swaps(&pRep->nPixels); - swaps(&pRep->nMasks); - WriteToClient(pClient, size, pRep); -} - void _X_COLD SAllocColorPlanesReply(ClientPtr pClient, int size, xAllocColorPlanesReply * pRep) diff --git a/dix/tables.c b/dix/tables.c index cd28872b5..7871d3957 100644 --- a/dix/tables.c +++ b/dix/tables.c @@ -801,7 +801,7 @@ ReplySwapPtr ReplySwapVector[256] = { ReplyNotSwappd, ReplyNotSwappd, ReplyNotSwappd, /* 85 */ - (ReplySwapPtr) SAllocColorCellsReply, + ReplyNotSwappd, (ReplySwapPtr) SAllocColorPlanesReply, ReplyNotSwappd, ReplyNotSwappd, diff --git a/include/swaprep.h b/include/swaprep.h index 9f6e4b989..08501e239 100644 --- a/include/swaprep.h +++ b/include/swaprep.h @@ -68,11 +68,6 @@ extern void SGetFontPathReply(ClientPtr /* pClient */ , int /* size */ , xGetFontPathReply * /* pRep */ ); -extern void SAllocColorCellsReply(ClientPtr /* pClient */ , - int /* size */ , - xAllocColorCellsReply * /* pRep */ - ); - extern void SAllocColorPlanesReply(ClientPtr /* pClient */ , int /* size */ , xAllocColorPlanesReply * /* pRep */