[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-xorg
Subject:    Re: [PATCH] XInput: protocol error handling cleanup
From:       Peter Hutterer <mailinglists () who-t ! net>
Date:       2007-09-26 23:54:52
Message-ID: 46FAEE7C.1000009 () who-t ! net
[Download RAW message or body]

Eamon Walsh wrote:
> Error handling cleanup patch for XInput.  Return errors to the dispatcher
> instead of calling SendErrorToClient.  Also fixes 2 "unused variable: stuff"
> warnings.
> 
> Will commit to master, without objection.

looks fine to me. no testing done though.


> @@ -98,10 +95,8 @@ SProcXChangeKeyboardDevice(ClientPtr client)
>  int
>  ProcXChangeKeyboardDevice(ClientPtr client)
>  {
> -    REQUEST(xChangeKeyboardDeviceReq);
> +    /* REQUEST(xChangeKeyboardDeviceReq); */
>      REQUEST_SIZE_MATCH(xChangeKeyboardDeviceReq);
>  
> -    SendErrorToClient(client, IReqCode, X_ChangeKeyboardDevice, 0,
> -                      BadDevice);
> -    return Success;
> +    return BadDevice;
>  }

just remove the REQUEST line completely. If it doesn't spit out an error
and it isn't used anyway I think this is more obvious than having it as
a comment (which looks more like a debugging thing).

> @@ -101,10 +98,8 @@ SProcXChangePointerDevice(ClientPtr client)
>  int
>  ProcXChangePointerDevice(ClientPtr client)
>  {
> -    REQUEST(xChangePointerDeviceReq);
> +    /* REQUEST(xChangePointerDeviceReq); */
>      REQUEST_SIZE_MATCH(xChangePointerDeviceReq);
>  
> -    SendErrorToClient(client, IReqCode, X_ChangePointerDevice, 0,
> -                      BadDevice);
> -    return Success;
> +    return BadDevice;
>  }

same as above.

Cheers,
    Peter

_______________________________________________
xorg mailing list
xorg@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xorg
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic