summaryrefslogtreecommitdiff
path: root/Xi/allowev.c
diff options
context:
space:
mode:
authorEamon Walsh <ewalsh@tycho.nsa.gov>2007-09-24 13:33:01 -0400
committerEamon Walsh <ewalsh@moss-charon.epoch.ncsc.mil>2007-09-26 07:26:59 -0400
commit31a7994ac7365562ef1d00e0a7b25f967a961a4e (patch)
treea2054c0e371e9c62396f2e09df469142dca0a633 /Xi/allowev.c
parent56ffc381d32687242dd094395fcf2216339bab2a (diff)
Input: Return errors to the dispatcher instead of sending them ourself.
Also fixed two "unused variable: stuff" warnings.
Diffstat (limited to 'Xi/allowev.c')
-rw-r--r--Xi/allowev.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/Xi/allowev.c b/Xi/allowev.c
index 85b6eaf6b..cf075e112 100644
--- a/Xi/allowev.c
+++ b/Xi/allowev.c
@@ -56,13 +56,10 @@ SOFTWARE.
#include <dix-config.h>
#endif
-#include <X11/X.h> /* for inputstr.h */
-#include <X11/Xproto.h> /* Request macro */
#include "inputstr.h" /* DeviceIntPtr */
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
-#include "extnsionst.h"
#include "extinit.h" /* LookupDeviceIntRec */
#include "exglobals.h"
@@ -103,10 +100,8 @@ ProcXAllowDeviceEvents(ClientPtr client)
REQUEST_SIZE_MATCH(xAllowDeviceEventsReq);
thisdev = LookupDeviceIntRec(stuff->deviceid);
- if (thisdev == NULL) {
- SendErrorToClient(client, IReqCode, X_AllowDeviceEvents, 0, BadDevice);
- return Success;
- }
+ if (thisdev == NULL)
+ return BadDevice;
time = ClientTimeToServerTime(stuff->time);
switch (stuff->mode) {
@@ -129,9 +124,8 @@ ProcXAllowDeviceEvents(ClientPtr client)
AllowSome(client, time, thisdev, THAWED_BOTH);
break;
default:
- SendErrorToClient(client, IReqCode, X_AllowDeviceEvents, 0, BadValue);
client->errorValue = stuff->mode;
- return Success;
+ return BadValue;
}
return Success;
}