static int XineramaXvSetPortAttribute(ClientPtr client) { REQUEST(xvSetPortAttributeReq); PanoramiXRes *port; int result = Success, i; REQUEST_SIZE_MATCH(xvSetPortAttributeReq); if(!(port = (PanoramiXRes *)SecurityLookupIDByType( client, stuff->port, XvXRTPort, DixReadAccess))) return _XvBadPort; FOR_NSCREENS_BACKWARD(i) { if(port->info[i].id) { stuff->port = port->info[i].id; result = ProcXvSetPortAttribute(client); } } return result; }
static int XineramaXvSetPortAttribute(ClientPtr client) { REQUEST(xvSetPortAttributeReq); PanoramiXRes *port; int result, i; REQUEST_SIZE_MATCH(xvSetPortAttributeReq); result = dixLookupResourceByType((pointer *)&port, stuff->port, XvXRTPort, client, DixReadAccess); if (result != Success) return result; FOR_NSCREENS_BACKWARD(i) { if(port->info[i].id) { stuff->port = port->info[i].id; result = ProcXvSetPortAttribute(client); } } return result; }