diff options
author | Keith Packard <keithp@keithp.com> | 2011-11-08 10:13:15 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-12-01 15:11:20 +0000 |
commit | fb22a408c69a84f81905147de9e82cf66ffb6eb2 (patch) | |
tree | 31940825720420898c4bf9d793560b54642692a3 /dix/extension.c | |
parent | 05f09354a30a4f5edd421220e1aa97be754c71bb (diff) |
Save major/minor opcodes in ClientRec for RecordAReply
The record extension needs the major and minor opcodes in the reply
hook, but the request buffer may have been freed by the time the hook
is invoked. Saving the request major and minor codes as the request is
executed avoids fetching from the defunct request buffer.
This patch also eliminates the public MinorOpcodeOfRequest function,
inlining it into Dispatch. Usages of that function have been replaced
with direct access to the new ClientRec field.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Diffstat (limited to 'dix/extension.c')
-rw-r--r-- | dix/extension.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/dix/extension.c b/dix/extension.c index 53aaf051f..cc516b6ba 100644 --- a/dix/extension.c +++ b/dix/extension.c @@ -228,20 +228,6 @@ StandardMinorOpcode(ClientPtr client) return ((xReq *)client->requestBuffer)->data; } -unsigned short -MinorOpcodeOfRequest(ClientPtr client) -{ - unsigned char major; - - major = ((xReq *)client->requestBuffer)->reqType; - if (major < EXTENSION_BASE) - return 0; - major -= EXTENSION_BASE; - if (major >= NumExtensions) - return 0; - return (*extensions[major]->MinorOpcode)(client); -} - void CloseDownExtensions(void) { |