[PATCH 1/2] Cygwin/X: Improve choice of display name used by internal clients

Yaakov (Cygwin/X) yselkowitz@users.sourceforge.net
Wed Oct 7 02:16:00 GMT 2009


On 01/10/2009 07:12, Jon TURNEY wrote:
> +  if (TransIsListening("local"))
> +    {
> +      snprintf(szDisplay, 512, ":%s.%d", display, screen);
> +    }
> +  else if (TransIsListening("inet"))
> +    {
> +      snprintf(szDisplay, 512, "127.0.0.1:%s.%d", display, screen);
> +    }
> +  else if (TransIsListening("inet6"))
> +    {
> +      snprintf(szDisplay, 512, "::1:%s.%d", display, screen);
> +    }

Perhaps we should be giving priority to inet6 over inet if it's available?

> +  else
> +    {
> +      // this can't happen!
> +      snprintf(szDisplay, 512, "localhost:%s.%d", display, screen);
> +    }

If this can't happen, an ErrorF would be appropriate.


Yaakov
Cygwin/X

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/



More information about the Cygwin-xfree mailing list