mirror of
https://gitlab.freedesktop.org/xorg/lib/libx11.git
synced 2026-05-07 12:08:19 +02:00
Revert "xcb: Add TCP fallback"
This reverts commit f09c5299a3.
The TCP fallback ended up falling back to UNIX socket connection if
$DISPLAY was set to e.g. some.host:0 and the initial attempt failed.
Debian bug#659558 <http://bugs.debian.org/659558>
Signed-off-by: Julien Cristau <jcristau@debian.org>
Conflicts:
src/OpenDis.c
This commit is contained in:
parent
f437819361
commit
20adca02c2
1 changed files with 0 additions and 19 deletions
|
|
@ -127,28 +127,9 @@ XOpenDisplay (
|
|||
*/
|
||||
|
||||
if(!_XConnectXCB(dpy, display, &iscreen)) {
|
||||
/* Try falling back on other transports if no transport specified */
|
||||
const char *slash = strrchr(display_name, '/');
|
||||
if(slash == NULL) {
|
||||
const char *protocols[] = {"local", "unix", "tcp", "inet6", "inet", NULL};
|
||||
const char **s;
|
||||
size_t buf_size = strlen(display_name) + 7; // max strlen + 2 (null + /)
|
||||
char *buf = Xmalloc(buf_size * sizeof(char));
|
||||
|
||||
if(buf) {
|
||||
for(s = protocols; buf && *s; s++) {
|
||||
snprintf(buf, buf_size, "%s/%s", *s, display_name);
|
||||
if(_XConnectXCB(dpy, buf, &iscreen))
|
||||
goto fallback_success;
|
||||
}
|
||||
Xfree(buf);
|
||||
}
|
||||
}
|
||||
|
||||
OutOfMemory(dpy);
|
||||
return NULL;
|
||||
}
|
||||
fallback_success:
|
||||
|
||||
/* Initialize as much of the display structure as we can.
|
||||
* Initialize pointers to NULL so that XFreeDisplayStructure will
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue