summaryrefslogtreecommitdiff
path: root/record
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-06-18 15:14:00 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-06-18 15:21:28 +1000
commit1e9907499c27321a2aa5dc8a75a375b7a82c999a (patch)
treecd3e50216934f94c74d90057a69e8db54d7161f1 /record
parent66089e9129a821cfb1983d3d35f41b975a52de5e (diff)
record: use dixLookupResourceByClass instead of LookupIDByClass.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'record')
-rw-r--r--record/record.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/record/record.c b/record/record.c
index cb7a6276c..3c4bb9ecb 100644
--- a/record/record.c
+++ b/record/record.c
@@ -1166,10 +1166,12 @@ RecordDeleteClientFromContext(RecordContextPtr pContext, XID clientspec)
* Side Effects: none.
*/
static int
-RecordSanityCheckClientSpecifiers(XID *clientspecs, int nspecs, XID errorspec)
+RecordSanityCheckClientSpecifiers(ClientPtr client, XID *clientspecs, int nspecs, XID errorspec)
{
int i;
int clientIndex;
+ int rc;
+ pointer value;
for (i = 0; i < nspecs; i++)
{
@@ -1185,8 +1187,10 @@ RecordSanityCheckClientSpecifiers(XID *clientspecs, int nspecs, XID errorspec)
{
if (clientspecs[i] == clients[clientIndex]->clientAsMask)
continue;
- if (!LookupIDByClass(clientspecs[i], RC_ANY))
- return BadMatch;
+ rc = dixLookupResourceByClass(&value, clientspecs[i], RC_ANY,
+ client, DixGetAttrAccess);
+ if (rc != Success)
+ return rc;
}
else
return BadMatch;
@@ -1342,8 +1346,8 @@ RecordSanityCheckRegisterClients(RecordContextPtr pContext, ClientPtr client, xR
recordingClient = pContext->pRecordingClient ?
pContext->pRecordingClient->clientAsMask : 0;
- err = RecordSanityCheckClientSpecifiers((XID *)&stuff[1], stuff->nClients,
- recordingClient);
+ err = RecordSanityCheckClientSpecifiers(client, (XID *)&stuff[1],
+ stuff->nClients, recordingClient);
if (err != Success) return err;
pRange = (xRecordRange *)(((XID *)&stuff[1]) + stuff->nClients);
@@ -1958,7 +1962,7 @@ ProcRecordUnregisterClients(ClientPtr client)
4 * stuff->nClients)
return BadLength;
VERIFY_CONTEXT(pContext, stuff->context, client);
- err = RecordSanityCheckClientSpecifiers((XID *)&stuff[1],
+ err = RecordSanityCheckClientSpecifiers(client, (XID *)&stuff[1],
stuff->nClients, 0);
if (err != Success)
return err;