mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
Change the devPrivates API to require dixRegisterPrivateKey
This patch only changes the API, not the implementation of the devPrivates infrastructure. This will permit a new devPrivates implementation to be layed into the server without requiring simultaneous changes in every devPrivates user. Signed-off-by: Keith Packard <keithp@keithp.com> Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com>
This commit is contained in:
@@ -51,8 +51,8 @@ static RESTYPE RTEventClient;
|
||||
static CallbackListPtr SecurityValidateGroupCallback = NULL;
|
||||
|
||||
/* Private state record */
|
||||
static int stateKeyIndex;
|
||||
static DevPrivateKey stateKey = &stateKeyIndex;
|
||||
static DevPrivateKeyRec stateKeyRec;
|
||||
#define stateKey (&stateKeyRec)
|
||||
|
||||
/* This is what we store as client security state */
|
||||
typedef struct {
|
||||
@@ -1108,7 +1108,7 @@ SecurityExtensionInit(INITARGS)
|
||||
RTEventClient |= RC_NEVERRETAIN;
|
||||
|
||||
/* Allocate the private storage */
|
||||
if (!dixRequestPrivate(stateKey, sizeof(SecurityStateRec)))
|
||||
if (!dixRegisterPrivateKey(stateKey, PRIVATE_CLIENT, sizeof(SecurityStateRec)))
|
||||
FatalError("SecurityExtensionSetup: Can't allocate client private.\n");
|
||||
|
||||
/* Register callbacks */
|
||||
|
||||
Reference in New Issue
Block a user