summaryrefslogtreecommitdiff
path: root/record
diff options
context:
space:
mode:
authorJamey Sharp <jamey@minilop.net>2010-04-24 23:56:36 -0700
committerJamey Sharp <jamey@minilop.net>2010-05-19 12:32:48 -0700
commitc38552d115e3bc71ad6179a8ad0d68778e943793 (patch)
treeaf6a02d6e34896c2a91b49ba568dab6bbad8b7d8 /record
parente291c561821ae86b7dd74269d5cd29bc31703962 (diff)
Add typed resource-lookup errors for non-core resource types.
Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'record')
-rw-r--r--record/record.c5
1 files changed, 2 insertions, 3 deletions
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 */