summaryrefslogtreecommitdiff
path: root/composite/compalloc.c
diff options
context:
space:
mode:
authorJamey Sharp <jamey@minilop.net>2010-05-07 18:11:36 -0700
committerJamey Sharp <jamey@minilop.net>2010-05-13 17:14:07 -0700
commit2d7eb4a19b773d0406c0c2e018a7da97f3565fd5 (patch)
tree4a10053cfd38a959c506d8a347b42976c7e160b3 /composite/compalloc.c
parente2929db7b737413cf93fbebdf4d15abdfebff05c (diff)
Pre-validate ChangeGC XIDs.
In order to execute a wire-level ChangeGC request, we need to look up the resources named by any XIDs in the value-list. Various places in the server already have pointers to the resources they want to set into the GC, though, so over time the interface has evolved to accept either XIDs or pointers, with several different function call signatures used in different eras. This patch makes the existing code require pointers to resources rather than XIDs, and adds a simple wrapper that looks up any XIDs. The old dixChangeGC API is preserved by delegating to whichever implementation is appropriate. This affects error-handling: If any of the XIDs are invalid, then the GC is unchanged, and its ChangeGC callback is not invoked. This change is allowed by the protocol spec, which says, "The order in which components are verified and altered is server-dependent. If an error is generated, a subset of the components may have been altered." Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'composite/compalloc.c')
0 files changed, 0 insertions, 0 deletions