xserver/dix
Peter Harris 97a8353ec1 Fix id in error when resource does not exist
Always set client->errorValue before returning an error.

Test program:

int main(int argc, char *argv[]) {
    int screen = 0;
    xcb_connection_t *c = xcb_connect(NULL, &screen);
    if (!c) {
        printf("Cannot connect\n");
        return 1;
    }

    xcb_void_cookie_t tok = xcb_free_gc_checked(c, BAD_VALUE);
    xcb_g_context_error_t *err = (xcb_g_context_error_t *)xcb_request_check(c, tok);
    if (!err) {
        printf("Unexpected request success\n");
        return 1;
    }
    if (err->bad_value != BAD_VALUE) {
        printf("Error: Got 0x%X, expected 0x%X\n", err->bad_value, BAD_VALUE);
        return 1;
    }
    printf("Success! Got expected bad value of 0x%X\n", BAD_VALUE);
    return 0;
}

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Peter Harris <pharris@opentext.com>
2016-10-06 14:50:42 -04:00
..
.gitignore
BuiltInAtoms
Makefile.am
Xserver-dtrace.h.in
Xserver.d
atom.c
buildatoms
colormap.c
cursor.c
devices.c
dispatch.c xace: Don't censor window borders 2016-09-28 15:25:07 -04:00
dispatch.h
dixfonts.c
dixutils.c
enterleave.c
enterleave.h
eventconvert.c
events.c
extension.c
ffs.c
gc.c
getevents.c
globals.c
glyphcurs.c
grabs.c
initatoms.c
inpututils.c dix: Add valuator_mask_set_absolute_unaccelerated 2016-10-05 13:46:29 -04:00
main.c
pixmap.c
privates.c
property.c
protocol.txt
ptrveloc.c
region.c
registry.c
resource.c Fix id in error when resource does not exist 2016-10-06 14:50:42 -04:00
selection.c
stubmain.c
swaprep.c
swapreq.c
tables.c
touch.c
window.c