[Xcb] [PATCH 2/7] Ensure that there's still a valid connection to the X server before attempting to send a request.

Uli Schlachter psychon at znc.in
Wed Feb 29 11:42:04 PST 2012


On 29.02.2012 17:59, Alex Plotnick wrote:
> ---
>  src/ext.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/src/ext.c b/src/ext.c
> index 2d622d9..6475850 100644
> --- a/src/ext.c
> +++ b/src/ext.c
> @@ -113,6 +113,10 @@ xpybExt_send_request(xpybExt *self, PyObject *args, PyObject *kw)
>  	    return NULL;
>  	}
>  
> +    /* Check the connection */
> +    if (xpybConn_invalid(self->conn))
> +	return NULL;
> +
>      /* Set up request structure */
>      xcb_req.count = 2;
>      xcb_req.ext = (self->key != (xpybExtkey *)Py_None) ? &self->key->key : 0;

I don't know much about xpyb's internals, but what exactly is the problem that
this patch fixes? Looking at the code, I'd expect the code to not do anything
bad with an error connection.

IMHO some of the other patches could need a more verbose commit message, too.

Now let's figure out who the resident xpyb expert is and wake him up. :-)


Uli
-- 
"Do you know that books smell like nutmeg or some spice from a foreign land?"
                                                  -- Faber in Fahrenheit 451


More information about the Xcb mailing list