aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/dispatch.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-12-05 07:42:31 +0100
committermarha <marha@users.sourceforge.net>2011-12-05 07:42:31 +0100
commit528f5bd58a139174170c4130c67dca30193c9057 (patch)
tree550c818095dbc607deaddf166c77116ccd91ef54 /xorg-server/dix/dispatch.c
parent2cfebffb491807a465a8e5f7daca582d8aefb829 (diff)
downloadvcxsrv-528f5bd58a139174170c4130c67dca30193c9057.tar.gz
vcxsrv-528f5bd58a139174170c4130c67dca30193c9057.tar.bz2
vcxsrv-528f5bd58a139174170c4130c67dca30193c9057.zip
xserver xkeyboard-config mesa git update 5 dec 2011
Diffstat (limited to 'xorg-server/dix/dispatch.c')
-rw-r--r--xorg-server/dix/dispatch.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/xorg-server/dix/dispatch.c b/xorg-server/dix/dispatch.c
index 6e3361573..b39271fd9 100644
--- a/xorg-server/dix/dispatch.c
+++ b/xorg-server/dix/dispatch.c
@@ -337,8 +337,6 @@ DisableLimitedSchedulingLatency(void)
SmartScheduleLatencyLimited = 0;
}
-#define MAJOROP ((xReq *)client->requestBuffer)->reqType
-
void
Dispatch(void)
{
@@ -419,21 +417,28 @@ Dispatch(void)
}
client->sequence++;
+ client->majorOp = ((xReq *)client->requestBuffer)->reqType;
+ client->minorOp = 0;
+ if (client->majorOp >= EXTENSION_BASE) {
+ ExtensionEntry *ext = GetExtensionEntry(client->majorOp);
+ if (ext)
+ client->minorOp = ext->MinorOpcode(client);
+ }
#ifdef XSERVER_DTRACE
- XSERVER_REQUEST_START(LookupMajorName(MAJOROP), MAJOROP,
+ XSERVER_REQUEST_START(LookupMajorName(client->majorOp), client->majorOp,
((xReq *)client->requestBuffer)->length,
client->index, client->requestBuffer);
#endif
if (result > (maxBigRequestSize << 2))
result = BadLength;
else {
- result = XaceHookDispatch(client, MAJOROP);
+ result = XaceHookDispatch(client, client->majorOp);
if (result == Success)
- result = (* client->requestVector[MAJOROP])(client);
+ result = (* client->requestVector[client->majorOp])(client);
XaceHookAuditEnd(client, result);
}
#ifdef XSERVER_DTRACE
- XSERVER_REQUEST_DONE(LookupMajorName(MAJOROP), MAJOROP,
+ XSERVER_REQUEST_DONE(LookupMajorName(client->majorOp), client->majorOp,
client->sequence, client->index, result);
#endif
@@ -444,8 +449,8 @@ Dispatch(void)
}
else if (result != Success)
{
- SendErrorToClient(client, MAJOROP,
- MinorOpcodeOfRequest(client),
+ SendErrorToClient(client, client->majorOp,
+ client->minorOp,
client->errorValue, result);
break;
}
@@ -466,8 +471,6 @@ Dispatch(void)
SmartScheduleLatencyLimited = 0;
}
-#undef MAJOROP
-
static int VendorRelease = VENDOR_RELEASE;
static char *VendorString = VENDOR_NAME;