[PATCH] dix: Fill in errorValue in ChangeGC for tile/stipple/clip BadMatch

Alan Coopersmith alan.coopersmith at oracle.com
Tue Jun 21 09:14:30 PDT 2011


On 06/21/11 02:52 AM, Daniel Stone wrote:
> On Mon, Jun 20, 2011 at 06:50:47PM -0400, Adam Jackson wrote:
>> The caveat here is that unused data in errors isn't guaranteed to be
>> 0, which means you'd have to know to only look for extra BadMatch
>> info for either a particular server version or (better) protocol
>> version.  You could reasonably make that part of protocol 11.1, on
>> the assumption that 11.0 clients wouldn't bother looking for it, but
>> that 11.1 clients would want to be assured of it.
> 
> Yeah, I was thinking about protocol 11.1, but from
> ProcEstablishConnection:
>     if ((prefix->majorVersion != X_PROTOCOL) ||
>         (prefix->minorVersion != X_PROTOCOL_REVISION))
>         reason = "Protocol version mismatch";
>     else
>         reason = ClientAuthorized(client,
>                                   (unsigned short)prefix->nbytesAuthProto,
>                                   auth_proto,
>                                   (unsigned short)prefix->nbytesAuthString,
>                                   auth_string);
> 
> So we could bump the server to 11.1 and allow 11.0 clients to connect,
> but 11.1 clients wouldn't be able to declare that to 11.0 servers.  Ugh.

Would it be simpler then to do this via an extension?  Perhaps Generic Event 1.1
could return more detailed errors to clients registered with it?

Seems like it would be nice to not just return the bad value in the error, but
some hint as to which field it was when multiple fields may contain the same
values.

-- 
	-Alan Coopersmith-        alan.coopersmith at oracle.com
	 Oracle Solaris Platform Engineering: X Window System



More information about the xorg-devel mailing list