Fix most remaining deprecated resource lookups.

Callsites updated to use dixLookupResourceBy{Type,Class}.
TODO: Audit access modes to make sure they reflect the usage.
This commit is contained in:
Eamon Walsh
2009-04-29 01:04:37 -04:00
parent 1abe0ee3da
commit 57aff88c7d
50 changed files with 1015 additions and 1035 deletions

View File

@@ -1252,12 +1252,13 @@ int
ProcCloseFont(ClientPtr client)
{
FontPtr pFont;
int rc;
REQUEST(xResourceReq);
REQUEST_SIZE_MATCH(xResourceReq);
pFont = (FontPtr)SecurityLookupIDByType(client, stuff->id, RT_FONT,
DixDestroyAccess);
if ( pFont != (FontPtr)NULL) /* id was valid */
rc = dixLookupResourceByType((pointer *)&pFont, stuff->id, RT_FONT,
client, DixDestroyAccess);
if (rc == Success)
{
FreeResource(stuff->id, RT_NONE);
return(client->noClientException);
@@ -1265,7 +1266,7 @@ ProcCloseFont(ClientPtr client)
else
{
client->errorValue = stuff->id;
return (BadFont);
return (rc == BadValue) ? BadFont : rc;
}
}