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>
This commit is contained in:
Keith Packard
2011-11-08 10:13:15 -08:00
parent 05f09354a3
commit fb22a408c6
7 changed files with 20 additions and 36 deletions

View File

@@ -52,8 +52,6 @@ _XFUNCPROTOBEGIN
extern _X_EXPORT unsigned short StandardMinorOpcode(ClientPtr /*client*/);
extern _X_EXPORT unsigned short MinorOpcodeOfRequest(ClientPtr /*client*/);
extern _X_EXPORT Bool EnableDisableExtension(const char *name, Bool enable);
extern _X_EXPORT void EnableDisableExtensionError(const char *name, Bool enable);