Xext: geext: use REPLY_*() macros for preparing / sending replies
Use the new macros for preparing and sending replies to clients. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
ff1cb0df89
commit
03b8cb506f
20
Xext/geext.c
20
Xext/geext.c
|
@ -73,15 +73,9 @@ ProcGEQueryVersion(ClientPtr client)
|
||||||
REQUEST_FIELD_CARD16(minorVersion);
|
REQUEST_FIELD_CARD16(minorVersion);
|
||||||
|
|
||||||
GEClientInfoPtr pGEClient = GEGetClient(client);
|
GEClientInfoPtr pGEClient = GEGetClient(client);
|
||||||
xGEQueryVersionReply rep;
|
|
||||||
|
|
||||||
rep = (xGEQueryVersionReply) {
|
xGEQueryVersionReply rep = {
|
||||||
.repType = X_Reply,
|
|
||||||
.RepType = X_GEQueryVersion,
|
.RepType = X_GEQueryVersion,
|
||||||
.sequenceNumber = client->sequence,
|
|
||||||
.length = 0,
|
|
||||||
|
|
||||||
/* return the supported version by the server */
|
|
||||||
.majorVersion = SERVER_GE_MAJOR_VERSION,
|
.majorVersion = SERVER_GE_MAJOR_VERSION,
|
||||||
.minorVersion = SERVER_GE_MINOR_VERSION
|
.minorVersion = SERVER_GE_MINOR_VERSION
|
||||||
};
|
};
|
||||||
|
@ -90,15 +84,9 @@ ProcGEQueryVersion(ClientPtr client)
|
||||||
pGEClient->major_version = stuff->majorVersion;
|
pGEClient->major_version = stuff->majorVersion;
|
||||||
pGEClient->minor_version = stuff->minorVersion;
|
pGEClient->minor_version = stuff->minorVersion;
|
||||||
|
|
||||||
if (client->swapped) {
|
REPLY_FIELD_CARD16(majorVersion);
|
||||||
swaps(&rep.sequenceNumber);
|
REPLY_FIELD_CARD16(minorVersion);
|
||||||
swapl(&rep.length);
|
REPLY_SEND_RET_SUCCESS();
|
||||||
swaps(&rep.majorVersion);
|
|
||||||
swaps(&rep.minorVersion);
|
|
||||||
}
|
|
||||||
|
|
||||||
WriteToClient(client, sizeof(xGEQueryVersionReply), &rep);
|
|
||||||
return Success;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************/
|
/************************************************************/
|
||||||
|
|
Loading…
Reference in New Issue