dix: write out X_GetFontPath reply directly
No need for using a complex callback machinery, if we just move the little pieces of byte-swapping directly into the request handler. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
62687ea1c2
commit
eb184c316d
|
@ -3489,7 +3489,6 @@ ProcSetFontPath(ClientPtr client)
|
|||
int
|
||||
ProcGetFontPath(ClientPtr client)
|
||||
{
|
||||
xGetFontPathReply reply;
|
||||
int rc, stringLens, numpaths;
|
||||
unsigned char *bufferStart;
|
||||
|
||||
|
@ -3500,16 +3499,20 @@ ProcGetFontPath(ClientPtr client)
|
|||
if (rc != Success)
|
||||
return rc;
|
||||
|
||||
reply = (xGetFontPathReply) {
|
||||
xGetFontPathReply rep = {
|
||||
.type = X_Reply,
|
||||
.sequenceNumber = client->sequence,
|
||||
.length = bytes_to_int32(stringLens + numpaths),
|
||||
.nPaths = numpaths
|
||||
};
|
||||
|
||||
WriteReplyToClient(client, sizeof(xGetFontPathReply), &reply);
|
||||
if (stringLens || numpaths)
|
||||
WriteToClient(client, stringLens + numpaths, bufferStart);
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
swaps(&rep.nPaths);
|
||||
}
|
||||
WriteToClient(client, sizeof(rep), &rep);
|
||||
WriteToClient(client, stringLens + numpaths, bufferStart);
|
||||
return Success;
|
||||
}
|
||||
|
||||
|
|
|
@ -301,15 +301,6 @@ SwapFont(xQueryFontReply * pr, Bool hasGlyphs)
|
|||
}
|
||||
}
|
||||
|
||||
void _X_COLD
|
||||
SGetFontPathReply(ClientPtr pClient, int size, xGetFontPathReply * pRep)
|
||||
{
|
||||
swaps(&pRep->sequenceNumber);
|
||||
swapl(&pRep->length);
|
||||
swaps(&pRep->nPaths);
|
||||
WriteToClient(pClient, size, pRep);
|
||||
}
|
||||
|
||||
void _X_COLD
|
||||
SListExtensionsReply(ClientPtr pClient, int size, xListExtensionsReply * pRep)
|
||||
{
|
||||
|
|
|
@ -767,7 +767,7 @@ ReplySwapPtr ReplySwapVector[256] = {
|
|||
ReplyNotSwappd,
|
||||
ReplyNotSwappd, /* 50 */
|
||||
ReplyNotSwappd,
|
||||
(ReplySwapPtr) SGetFontPathReply,
|
||||
ReplyNotSwappd,
|
||||
ReplyNotSwappd,
|
||||
ReplyNotSwappd,
|
||||
ReplyNotSwappd, /* 55 */
|
||||
|
|
|
@ -64,10 +64,6 @@ extern void SGetInputFocusReply(ClientPtr /* pClient */ ,
|
|||
int /* size */ ,
|
||||
xGetInputFocusReply * /* pRep */ );
|
||||
|
||||
extern void SGetFontPathReply(ClientPtr /* pClient */ ,
|
||||
int /* size */ ,
|
||||
xGetFontPathReply * /* pRep */ );
|
||||
|
||||
extern void SListExtensionsReply(ClientPtr /* pClient */ ,
|
||||
int /* size */ ,
|
||||
xListExtensionsReply * /* pRep */ );
|
||||
|
|
Loading…
Reference in New Issue