diff --git a/dix/dixfonts.c b/dix/dixfonts.c index 26ccdb1c9..c845c9828 100644 --- a/dix/dixfonts.c +++ b/dix/dixfonts.c @@ -59,6 +59,7 @@ Equipment Corporation. #include "dix/dix_priv.h" #include "dix/gc_priv.h" +#include "include/swaprep.h" #include "os/auth.h" #include "scrnintstr.h" @@ -862,7 +863,6 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c) xFontProp *pFP; int i; int aliascount = 0; - xListFontsWithInfoReply finalReply; if (client->clientGone) { if (c->current.current_fpe < c->num_fpes) { @@ -872,7 +872,6 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c) err = Successful; goto bail; } - client->pSwapReplyFunc = ReplySwapVector[X_ListFontsWithInfo]; if (!c->current.patlen) goto finish; while (c->current.current_fpe < c->num_fpes) { @@ -1014,7 +1013,10 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c) pFP->value = pFontInfo->props[i].value; pFP++; } - WriteSwappedDataToClient(client, length, reply); + if (client->swapped) { + SwapFont((xQueryFontReply *) reply, FALSE); + } + WriteToClient(client, length, reply); WriteToClient(client, namelen, name); if (pFontInfo == &fontInfo) { free(fontInfo.props); @@ -1025,13 +1027,16 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c) } finish: length = sizeof(xListFontsWithInfoReply); - finalReply = (xListFontsWithInfoReply) { + xListFontsWithInfoReply rep = { .type = X_Reply, .sequenceNumber = client->sequence, .length = bytes_to_int32(sizeof(xListFontsWithInfoReply) - sizeof(xGenericReply)) }; - WriteSwappedDataToClient(client, length, &finalReply); + if (client->swapped) { + SwapFont((xQueryFontReply *) &rep, FALSE); + } + WriteToClient(client, length, &rep); bail: ClientWakeup(client); for (i = 0; i < c->num_fpes; i++) diff --git a/dix/swaprep.c b/dix/swaprep.c index 109241068..017a901e8 100644 --- a/dix/swaprep.c +++ b/dix/swaprep.c @@ -316,14 +316,6 @@ SQueryTextExtentsReply(ClientPtr pClient, int size, WriteToClient(pClient, size, pRep); } -void _X_COLD -SListFontsWithInfoReply(ClientPtr pClient, int size, - xListFontsWithInfoReply * pRep) -{ - SwapFont((xQueryFontReply *) pRep, FALSE); - WriteToClient(pClient, size, pRep); -} - void _X_COLD SGetFontPathReply(ClientPtr pClient, int size, xGetFontPathReply * pRep) { diff --git a/dix/tables.c b/dix/tables.c index cfad1dec6..0dc04c41c 100644 --- a/dix/tables.c +++ b/dix/tables.c @@ -765,7 +765,7 @@ ReplySwapPtr ReplySwapVector[256] = { ReplyNotSwappd, (ReplySwapPtr) SQueryTextExtentsReply, ReplyNotSwappd, - (ReplySwapPtr) SListFontsWithInfoReply, /* 50 */ + ReplyNotSwappd, /* 50 */ ReplyNotSwappd, (ReplySwapPtr) SGetFontPathReply, ReplyNotSwappd, diff --git a/include/swaprep.h b/include/swaprep.h index c673f13af..78ead5c5f 100644 --- a/include/swaprep.h +++ b/include/swaprep.h @@ -69,11 +69,6 @@ extern void SQueryTextExtentsReply(ClientPtr /* pClient */ , xQueryTextExtentsReply * /* pRep */ ); -extern void SListFontsWithInfoReply(ClientPtr /* pClient */ , - int /* size */ , - xListFontsWithInfoReply * - /* pRep */ ); - extern void SGetFontPathReply(ClientPtr /* pClient */ , int /* size */ , xGetFontPathReply * /* pRep */ );