[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-xcb
Subject:    [Xcb] [PATCH libx11] Revert "xcb: Add TCP fallback"
From:       Julien Cristau <jcristau () debian ! org>
Date:       2012-02-19 12:43:53
Message-ID: 1329655434-23283-1-git-send-email-jcristau () debian ! org
[Download RAW message or body]

This reverts commit f09c5299a381e2729e800a0ac43f1c0e371f65f6.

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
---
 src/OpenDis.c |   19 -------------------
 1 files changed, 0 insertions(+), 19 deletions(-)

diff --git a/src/OpenDis.c b/src/OpenDis.c
index e568a30..9379fec 100644
--- a/src/OpenDis.c
+++ b/src/OpenDis.c
@@ -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
-- 
1.7.9

_______________________________________________
Xcb mailing list
Xcb@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xcb
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic