From c38552d115e3bc71ad6179a8ad0d68778e943793 Mon Sep 17 00:00:00 2001 From: Jamey Sharp Date: Sat, 24 Apr 2010 23:56:36 -0700 Subject: Add typed resource-lookup errors for non-core resource types. Signed-off-by: Jamey Sharp Reviewed-by: Adam Jackson --- record/record.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'record') diff --git a/record/record.c b/record/record.c index 1b55d6bf0..3724dc7a9 100644 --- a/record/record.c +++ b/record/record.c @@ -58,7 +58,6 @@ and Jim Haggerty of Metheus. #include "protocol-versions.h" static RESTYPE RTContext; /* internal resource type for Record contexts */ -static int RecordErrorBase; /* first Record error number */ /* How many bytes of protocol data to buffer in a context. Don't set to less * than 32. @@ -133,7 +132,7 @@ static int numEnabledRCAPs; int rc = dixLookupResourceByType((pointer *)&(_pContext), _contextid, \ RTContext, _client, DixUseAccess); \ if (rc != Success) \ - return (rc == BadValue) ? RecordErrorBase + XRecordBadContext : rc; \ + return rc; \ } static int RecordDeleteContext( @@ -2911,7 +2910,7 @@ RecordExtensionInit(void) DeleteCallback(&ClientStateCallback, RecordAClientStateChange, NULL); return; } - RecordErrorBase = extentry->errorBase; + SetResourceTypeErrorValue(RTContext, extentry->errorBase + XRecordBadContext); } /* RecordExtensionInit */ -- cgit v1.2.3