On Fri, 2011-01-07 at 00:02 +0100, Julien Cristau wrote:
> On Thu, Jan  6, 2011 at 17:28:59 -0500, Adam Jackson wrote:
> > +static Bool
> > +TryCreateSocket(int num, int *partial)
> > +{
> > +    char port[20];
> > +
> > +    sprintf(port, "%d", num);
> > +
> > +    return _XSERVTransMakeAllCOTSServerListeners(port, partial,
> > +                                            &ListenTransCount,
> > +                                            &ListenTransConns);
> 
> Cast from int to Bool, _XSERVTransMakeAllCOTSServerListeners seems to
> return 0 on success, I guess this should return
> _XSERVTransMakeAllCOTSServerListeners() >= 0?

Good point, though the rest of the code seems to work correctly with
that inversion.

> > +    else /* -displayfd */
> > +    {
> > +   Bool found = 0;
> > +   for (i = 0; i < 65535 - 1024; i++)
> 
> Should this be 65535 - 6000?

Yeah.  I was trying to avoid binding to reserved ports but clearly
that's not what that does, and apparently asking for a display number
that would wrap around into the 1025..5999 range doesn't work anyway.

- ajax

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to