Convert callers of LookupClient() to dixLookupClient().
This commit is contained in:
parent
f11dafaafc
commit
ab1d5b0c31
|
@ -485,10 +485,13 @@ int ProcXagQuery(
|
|||
ClientPtr pClient;
|
||||
AppGroupPtr pAppGrp;
|
||||
REQUEST (xXagQueryReq);
|
||||
int n;
|
||||
int n, rc;
|
||||
|
||||
REQUEST_SIZE_MATCH (xXagQueryReq);
|
||||
pClient = LookupClient (stuff->resource, client);
|
||||
rc = dixLookupClient(&pClient, stuff->resource, client, DixUnknownAccess);
|
||||
if (rc != Success)
|
||||
return rc;
|
||||
|
||||
for (pAppGrp = appGrpList; pAppGrp != NULL; pAppGrp = pAppGrp->next)
|
||||
for (n = 0; n < pAppGrp->nclients; n++)
|
||||
if (pAppGrp->clients[n] == pClient) {
|
||||
|
|
20
Xext/sync.c
20
Xext/sync.c
|
@ -1452,15 +1452,17 @@ ProcSyncSetPriority(client)
|
|||
{
|
||||
REQUEST(xSyncSetPriorityReq);
|
||||
ClientPtr priorityclient;
|
||||
int rc;
|
||||
|
||||
REQUEST_SIZE_MATCH(xSyncSetPriorityReq);
|
||||
|
||||
if (stuff->id == None)
|
||||
priorityclient = client;
|
||||
else if (!(priorityclient = LookupClient(stuff->id, client)))
|
||||
{
|
||||
client->errorValue = stuff->id;
|
||||
return BadMatch;
|
||||
else {
|
||||
rc = dixLookupClient(&priorityclient, stuff->id, client,
|
||||
DixUnknownAccess);
|
||||
if (rc != Success)
|
||||
return rc;
|
||||
}
|
||||
|
||||
if (priorityclient->priority != stuff->priority)
|
||||
|
@ -1487,15 +1489,17 @@ ProcSyncGetPriority(client)
|
|||
REQUEST(xSyncGetPriorityReq);
|
||||
xSyncGetPriorityReply rep;
|
||||
ClientPtr priorityclient;
|
||||
int rc;
|
||||
|
||||
REQUEST_SIZE_MATCH(xSyncGetPriorityReq);
|
||||
|
||||
if (stuff->id == None)
|
||||
priorityclient = client;
|
||||
else if (!(priorityclient = LookupClient(stuff->id, client)))
|
||||
{
|
||||
client->errorValue = stuff->id;
|
||||
return BadMatch;
|
||||
else {
|
||||
rc = dixLookupClient(&priorityclient, stuff->id, client,
|
||||
DixUnknownAccess);
|
||||
if (rc != Success)
|
||||
return rc;
|
||||
}
|
||||
|
||||
rep.type = X_Reply;
|
||||
|
|
|
@ -3388,7 +3388,8 @@ int
|
|||
ProcKillClient(register ClientPtr client)
|
||||
{
|
||||
REQUEST(xResourceReq);
|
||||
ClientPtr killclient;
|
||||
ClientPtr killclient;
|
||||
int rc;
|
||||
|
||||
REQUEST_SIZE_MATCH(xResourceReq);
|
||||
if (stuff->id == AllTemporary)
|
||||
|
@ -3397,8 +3398,8 @@ ProcKillClient(register ClientPtr client)
|
|||
return (client->noClientException);
|
||||
}
|
||||
|
||||
if ((killclient = LookupClient(stuff->id, client)))
|
||||
{
|
||||
rc = dixLookupClient(&killclient, stuff->id, client, DixDestroyAccess);
|
||||
if (rc == Success) {
|
||||
CloseDownClient(killclient);
|
||||
/* if an LBX proxy gets killed, isItTimeToYield will be set */
|
||||
if (isItTimeToYield || (client == killclient))
|
||||
|
@ -3412,10 +3413,7 @@ ProcKillClient(register ClientPtr client)
|
|||
return (client->noClientException);
|
||||
}
|
||||
else
|
||||
{
|
||||
client->errorValue = stuff->id;
|
||||
return (BadValue);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
@ -262,11 +262,12 @@ dixLookupGC(GCPtr *pGC, XID id, ClientPtr client, Mask access)
|
|||
}
|
||||
|
||||
_X_EXPORT int
|
||||
dixLookupClient(ClientPtr *pClient, XID rid, ClientPtr client)
|
||||
dixLookupClient(ClientPtr *pClient, XID rid, ClientPtr client, Mask access)
|
||||
{
|
||||
pointer pRes = (pointer)SecurityLookupIDByClass(client, rid, RC_ANY,
|
||||
DixReadAccess);
|
||||
int clientIndex = CLIENT_ID(rid);
|
||||
client->errorValue = rid;
|
||||
|
||||
if (clientIndex && pRes && clients[clientIndex] && !(rid & SERVER_BIT)) {
|
||||
*pClient = clients[clientIndex];
|
||||
|
@ -312,7 +313,7 @@ _X_EXPORT ClientPtr
|
|||
LookupClient(XID id, ClientPtr client)
|
||||
{
|
||||
ClientPtr pClient;
|
||||
int i = dixLookupClient(&pClient, id, client);
|
||||
int i = dixLookupClient(&pClient, id, client, DixUnknownAccess);
|
||||
return (i == Success) ? pClient : NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -301,7 +301,8 @@ extern int dixLookupGC(
|
|||
extern int dixLookupClient(
|
||||
ClientPtr *result,
|
||||
XID id,
|
||||
ClientPtr client);
|
||||
ClientPtr client,
|
||||
Mask access_mode);
|
||||
|
||||
/*
|
||||
* These are deprecated compatibility functions and will be removed soon!
|
||||
|
|
Loading…
Reference in New Issue
Block a user