summaryrefslogtreecommitdiff
path: root/record
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2009-04-29 01:04:37 -0400
committerEamon Walsh <ewalsh@tycho.nsa.gov>2009-04-29 01:04:37 -0400
commit57aff88c7d0761e590806d07bee1c9410680c89f (patch)
tree48f05f58a72183556af3b0a7f3f286959d7e096a /record
parent1abe0ee3da5e1268c7315f841d31337ea6524cf0 (diff)
Fix most remaining deprecated resource lookups.
Callsites updated to use dixLookupResourceBy{Type,Class}. TODO: Audit access modes to make sure they reflect the usage.
Diffstat (limited to 'record')
-rw-r--r--record/record.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/record/record.c b/record/record.c
index f97626f73..cb7a6276c 100644
--- a/record/record.c
+++ b/record/record.c
@@ -127,11 +127,10 @@ static int numEnabledRCAPs;
* returns an error.
*/
#define VERIFY_CONTEXT(_pContext, _contextid, _client) { \
- (_pContext) = (RecordContextPtr)LookupIDByType((_contextid), RTContext); \
- if (!(_pContext)) { \
- (_client)->errorValue = (_contextid); \
- return RecordErrorBase + XRecordBadContext; \
- } \
+ int rc = dixLookupResourceByType((pointer *)&(_pContext), _contextid, \
+ RTContext, _client, DixUseAccess); \
+ if (rc != Success) \
+ return (rc == BadValue) ? RecordErrorBase + XRecordBadContext : rc; \
}
static int RecordDeleteContext(