record: use dixLookupResourceByClass instead of LookupIDByClass.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
66089e9129
commit
1e9907499c
|
@ -1166,10 +1166,12 @@ RecordDeleteClientFromContext(RecordContextPtr pContext, XID clientspec)
|
||||||
* Side Effects: none.
|
* Side Effects: none.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
RecordSanityCheckClientSpecifiers(XID *clientspecs, int nspecs, XID errorspec)
|
RecordSanityCheckClientSpecifiers(ClientPtr client, XID *clientspecs, int nspecs, XID errorspec)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int clientIndex;
|
int clientIndex;
|
||||||
|
int rc;
|
||||||
|
pointer value;
|
||||||
|
|
||||||
for (i = 0; i < nspecs; i++)
|
for (i = 0; i < nspecs; i++)
|
||||||
{
|
{
|
||||||
|
@ -1185,8 +1187,10 @@ RecordSanityCheckClientSpecifiers(XID *clientspecs, int nspecs, XID errorspec)
|
||||||
{
|
{
|
||||||
if (clientspecs[i] == clients[clientIndex]->clientAsMask)
|
if (clientspecs[i] == clients[clientIndex]->clientAsMask)
|
||||||
continue;
|
continue;
|
||||||
if (!LookupIDByClass(clientspecs[i], RC_ANY))
|
rc = dixLookupResourceByClass(&value, clientspecs[i], RC_ANY,
|
||||||
return BadMatch;
|
client, DixGetAttrAccess);
|
||||||
|
if (rc != Success)
|
||||||
|
return rc;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return BadMatch;
|
return BadMatch;
|
||||||
|
@ -1342,8 +1346,8 @@ RecordSanityCheckRegisterClients(RecordContextPtr pContext, ClientPtr client, xR
|
||||||
|
|
||||||
recordingClient = pContext->pRecordingClient ?
|
recordingClient = pContext->pRecordingClient ?
|
||||||
pContext->pRecordingClient->clientAsMask : 0;
|
pContext->pRecordingClient->clientAsMask : 0;
|
||||||
err = RecordSanityCheckClientSpecifiers((XID *)&stuff[1], stuff->nClients,
|
err = RecordSanityCheckClientSpecifiers(client, (XID *)&stuff[1],
|
||||||
recordingClient);
|
stuff->nClients, recordingClient);
|
||||||
if (err != Success) return err;
|
if (err != Success) return err;
|
||||||
|
|
||||||
pRange = (xRecordRange *)(((XID *)&stuff[1]) + stuff->nClients);
|
pRange = (xRecordRange *)(((XID *)&stuff[1]) + stuff->nClients);
|
||||||
|
@ -1958,7 +1962,7 @@ ProcRecordUnregisterClients(ClientPtr client)
|
||||||
4 * stuff->nClients)
|
4 * stuff->nClients)
|
||||||
return BadLength;
|
return BadLength;
|
||||||
VERIFY_CONTEXT(pContext, stuff->context, client);
|
VERIFY_CONTEXT(pContext, stuff->context, client);
|
||||||
err = RecordSanityCheckClientSpecifiers((XID *)&stuff[1],
|
err = RecordSanityCheckClientSpecifiers(client, (XID *)&stuff[1],
|
||||||
stuff->nClients, 0);
|
stuff->nClients, 0);
|
||||||
if (err != Success)
|
if (err != Success)
|
||||||
return err;
|
return err;
|
||||||
|
|
Loading…
Reference in New Issue