diff --git a/Xext/geext.c b/Xext/geext.c index 9ae2bc9106..9bc4ad0a2f 100644 --- a/Xext/geext.c +++ b/Xext/geext.c @@ -73,6 +73,11 @@ ProcGEQueryVersion(ClientPtr client) REQUEST(xGEQueryVersionReq); REQUEST_SIZE_MATCH(xGEQueryVersionReq); + if (client->swapped) { + swaps(&stuff->majorVersion); + swaps(&stuff->minorVersion); + } + xGEQueryVersionReply reply = { .RepType = X_GEQueryVersion, /* return the supported version by the server */ @@ -93,19 +98,6 @@ ProcGEQueryVersion(ClientPtr client) return Success; } -/************************************************************/ -/* swapped request handlers */ -/************************************************************/ -static int _X_COLD -SProcGEQueryVersion(ClientPtr client) -{ - REQUEST(xGEQueryVersionReq); - REQUEST_SIZE_MATCH(xGEQueryVersionReq); - swaps(&stuff->majorVersion); - swaps(&stuff->minorVersion); - return ProcGEQueryVersion(client); -} - /************************************************************/ /* callbacks */ /************************************************************/ @@ -124,20 +116,6 @@ ProcGEDispatch(ClientPtr client) } } -/* dispatch swapped requests */ -static int _X_COLD -SProcGEDispatch(ClientPtr client) -{ - REQUEST(xReq); - - switch (stuff->data) { - case X_GEQueryVersion: - return SProcGEQueryVersion(client); - default: - return BadRequest; - } -} - /* Reset extension. Called on server shutdown. */ static void GEResetProc(ExtensionEntry * extEntry) @@ -178,7 +156,7 @@ GEExtensionInit(void) (&GEClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(GEClientInfoRec))) FatalError("GEExtensionInit: GE private request failed.\n"); - if (!AddExtension(GE_NAME, 0, GENumberErrors, ProcGEDispatch, SProcGEDispatch, + if (!AddExtension(GE_NAME, 0, GENumberErrors, ProcGEDispatch, ProcGEDispatch, GEResetProc, StandardMinorOpcode)) FatalError("GEInit: AddExtensions failed.\n");