Put the correct value in the length field of the reply. Previously, the

number of tag/date pairs was specified. This was incorrect. The correct
    value is the number of values (one for the tag and one for the value).
Xorg bug: #3210
This commit is contained in:
Ian Romanick 2005-07-06 07:16:19 +00:00
parent 6ba4a2e78a
commit baa99be190

View File

@ -1005,7 +1005,7 @@ int __glXGetVisualConfigs(__GLXclientState *cl, GLbyte *pc)
#define __GLX_TOTAL_FBCONFIG_ATTRIBS (28)
#define __GLX_FBCONFIG_ATTRIBS_LENGTH (__GLX_TOTAL_FBCONFIG_ATTRIBS * 2)
/**
* Send the set of GLXFBConfigs to the client. There is not currently
* and interface into the driver on the server-side to get GLXFBConfigs,
@ -1021,7 +1021,7 @@ int DoGetFBConfigs(__GLXclientState *cl, unsigned screen, GLboolean do_swap)
ClientPtr client = cl->client;
xGLXGetFBConfigsReply reply;
__GLXscreenInfo *pGlxScreen;
CARD32 buf[__GLX_TOTAL_FBCONFIG_ATTRIBS * 2];
CARD32 buf[__GLX_FBCONFIG_ATTRIBS_LENGTH];
int p;
__GLcontextModes *modes;
__GLX_DECLARE_SWAP_VARIABLES;
@ -1037,7 +1037,7 @@ int DoGetFBConfigs(__GLXclientState *cl, unsigned screen, GLboolean do_swap)
reply.numFBConfigs = pGlxScreen->numUsableVisuals;
reply.numAttribs = __GLX_TOTAL_FBCONFIG_ATTRIBS;
reply.length = (reply.numAttribs * reply.numFBConfigs);
reply.length = (__GLX_FBCONFIG_ATTRIBS_LENGTH * reply.numFBConfigs);
reply.type = X_Reply;
reply.sequenceNumber = client->sequence;
@ -1097,9 +1097,9 @@ int DoGetFBConfigs(__GLXclientState *cl, unsigned screen, GLboolean do_swap)
WRITE_PAIR( GLX_SWAP_METHOD_OML, modes->swapMethod );
if ( do_swap ) {
__GLX_SWAP_INT_ARRAY(buf, __GLX_TOTAL_FBCONFIG_ATTRIBS * 2);
__GLX_SWAP_INT_ARRAY(buf, __GLX_FBCONFIG_ATTRIBS_LENGTH);
}
WriteToClient(client, __GLX_SIZE_CARD32 * __GLX_TOTAL_FBCONFIG_ATTRIBS * 2,
WriteToClient(client, __GLX_SIZE_CARD32 * __GLX_FBCONFIG_ATTRIBS_LENGTH,
(char *)buf);
}
return Success;