This is the mail archive of the cygwin-xfree mailing list for the Cygwin XFree86 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


On 07/10/2009 03:16, Yaakov (Cygwin/X) wrote:
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?

I don't know. I didn't think very much about the order.


I guess we should prefer inet first, as that's what we are doing currently, so at least in theory we know that works. I don't know if there's any performance reason to prefer a unix socket (I think they are implemented using a IP socket anyhow?).

What reasons are there for preferring inet6?

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

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

Good catch, thanks.


--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]