Commit 8e9e7766 authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

NXextension.c: use ProcQueryExtension() from dix

parent d6872d4e
......@@ -332,7 +332,6 @@ CloseDownExtensions()
}
}
#ifndef NXAGENT_SERVER
int
ProcQueryExtension(ClientPtr client)
{
......@@ -373,6 +372,7 @@ ProcQueryExtension(ClientPtr client)
return(client->noClientException);
}
#ifndef NXAGENT_SERVER
int
ProcListExtensions(ClientPtr client)
{
......
......@@ -75,46 +75,6 @@ SOFTWARE.
#include "../../dix/extension.c"
int
ProcQueryExtension(ClientPtr client)
{
xQueryExtensionReply reply;
int i;
REQUEST(xQueryExtensionReq);
REQUEST_FIXED_SIZE(xQueryExtensionReq, stuff->nbytes);
memset(&reply, 0, sizeof(xQueryExtensionReply));
reply.type = X_Reply;
reply.length = 0;
reply.major_opcode = 0;
reply.sequenceNumber = client->sequence;
if ( ! NumExtensions )
reply.present = xFalse;
else
{
i = FindExtension((char *)&stuff[1], stuff->nbytes);
if (i < 0
#ifdef XCSECURITY
/* don't show insecure extensions to untrusted clients */
|| (client->trustLevel == XSecurityClientUntrusted &&
!extensions[i]->secure)
#endif
)
reply.present = xFalse;
else
{
reply.present = xTrue;
reply.major_opcode = extensions[i]->base;
reply.first_event = extensions[i]->eventBase;
reply.first_error = extensions[i]->errorBase;
}
}
WriteReplyToClient(client, sizeof(xQueryExtensionReply), &reply);
return(client->noClientException);
}
int
ProcListExtensions(ClientPtr client)
{
xListExtensionsReply reply;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment