dix: write out X_GetScreenSaver 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
d459390a2d
commit
5fd2c1c70a
|
@ -3299,7 +3299,6 @@ ProcSetScreenSaver(ClientPtr client)
|
|||
int
|
||||
ProcGetScreenSaver(ClientPtr client)
|
||||
{
|
||||
xGetScreenSaverReply rep;
|
||||
int rc, i;
|
||||
|
||||
REQUEST_SIZE_MATCH(xReq);
|
||||
|
@ -3311,7 +3310,7 @@ ProcGetScreenSaver(ClientPtr client)
|
|||
return rc;
|
||||
}
|
||||
|
||||
rep = (xGetScreenSaverReply) {
|
||||
xGetScreenSaverReply rep = {
|
||||
.type = X_Reply,
|
||||
.sequenceNumber = client->sequence,
|
||||
.length = 0,
|
||||
|
@ -3320,7 +3319,13 @@ ProcGetScreenSaver(ClientPtr client)
|
|||
.preferBlanking = ScreenSaverBlanking,
|
||||
.allowExposures = ScreenSaverAllowExposures
|
||||
};
|
||||
WriteReplyToClient(client, sizeof(xGetScreenSaverReply), &rep);
|
||||
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber);
|
||||
swaps(&rep.timeout);
|
||||
swaps(&rep.interval);
|
||||
}
|
||||
WriteToClient(client, sizeof(rep), &rep);
|
||||
return Success;
|
||||
}
|
||||
|
||||
|
|
|
@ -318,15 +318,6 @@ SListExtensionsReply(ClientPtr pClient, int size, xListExtensionsReply * pRep)
|
|||
WriteToClient(pClient, size, pRep);
|
||||
}
|
||||
|
||||
void _X_COLD
|
||||
SGetScreenSaverReply(ClientPtr pClient, int size, xGetScreenSaverReply * pRep)
|
||||
{
|
||||
swaps(&pRep->sequenceNumber);
|
||||
swaps(&pRep->timeout);
|
||||
swaps(&pRep->interval);
|
||||
WriteToClient(pClient, size, pRep);
|
||||
}
|
||||
|
||||
void _X_COLD
|
||||
SLHostsExtend(ClientPtr pClient, int size, char *buf)
|
||||
{
|
||||
|
|
|
@ -823,7 +823,7 @@ ReplySwapPtr ReplySwapVector[256] = {
|
|||
ReplyNotSwappd, /* 105 */
|
||||
ReplyNotSwappd,
|
||||
ReplyNotSwappd,
|
||||
(ReplySwapPtr) SGetScreenSaverReply,
|
||||
ReplyNotSwappd,
|
||||
ReplyNotSwappd,
|
||||
(ReplySwapPtr) SListHostsReply, /* 110 */
|
||||
ReplyNotSwappd,
|
||||
|
|
|
@ -72,10 +72,6 @@ extern void SListExtensionsReply(ClientPtr /* pClient */ ,
|
|||
int /* size */ ,
|
||||
xListExtensionsReply * /* pRep */ );
|
||||
|
||||
extern void SGetScreenSaverReply(ClientPtr /* pClient */ ,
|
||||
int /* size */ ,
|
||||
xGetScreenSaverReply * /* pRep */ );
|
||||
|
||||
extern void SLHostsExtend(ClientPtr /* pClient */ ,
|
||||
int /* size */ ,
|
||||
char * /* buf */ );
|
||||
|
|
Loading…
Reference in New Issue