From 377a5f655ca88cd836da24ab42361df9f3ff51a2 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 2 Sep 2009 11:16:15 +1000 Subject: Xi: if XISetEventMask fails, return this to the client. The only failure point can be a BadAlloc. Signed-off-by: Peter Hutterer --- test/xi2/protocol-common.h | 2 +- test/xi2/protocol-xiselectevents.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'test/xi2') diff --git a/test/xi2/protocol-common.h b/test/xi2/protocol-common.h index bf8b8754e..1ab35c92e 100644 --- a/test/xi2/protocol-common.h +++ b/test/xi2/protocol-common.h @@ -131,7 +131,7 @@ void init_simple(void); /* Declarations for various overrides in the test files. */ void __wrap_WriteToClient(ClientPtr client, int len, void *data); -void __wrap_XISetEventMask(DeviceIntPtr dev, WindowPtr win, int len, unsigned char* mask); +int __wrap_XISetEventMask(DeviceIntPtr dev, WindowPtr win, int len, unsigned char* mask); int __wrap_dixLookupWindow(WindowPtr *win, XID id, ClientPtr client, Mask access); int __real_dixLookupWindow(WindowPtr *win, XID id, ClientPtr client, Mask access); Bool __wrap_AddResource(XID id, RESTYPE type, pointer value); diff --git a/test/xi2/protocol-xiselectevents.c b/test/xi2/protocol-xiselectevents.c index 9782cff5c..f314462b5 100644 --- a/test/xi2/protocol-xiselectevents.c +++ b/test/xi2/protocol-xiselectevents.c @@ -62,8 +62,9 @@ static unsigned char *data[4096 * 16]; /* the request data buffer */ -void __wrap_XISetEventMask(DeviceIntPtr dev, WindowPtr win, int len, unsigned char* mask) +int __wrap_XISetEventMask(DeviceIntPtr dev, WindowPtr win, int len, unsigned char* mask) { + return Success; } /* dixLookupWindow requires a lot of setup not necessary for this test. -- cgit v1.2.3