aboutsummaryrefslogtreecommitdiff
path: root/libxcb/src/xcb_util.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-04-13 07:19:47 +0000
committermarha <marha@users.sourceforge.net>2011-04-13 07:19:47 +0000
commitd92d86b5e751381366dcde13cf983e041e300ee2 (patch)
treedd51efa32957d8d98d06e6ecd0f287322a933025 /libxcb/src/xcb_util.c
parente2c8d047679db3bbb166d709b86e18180be6d713 (diff)
parent125aba11ec484309e4dc5b2abf1b15ac98784159 (diff)
downloadvcxsrv-d92d86b5e751381366dcde13cf983e041e300ee2.tar.gz
vcxsrv-d92d86b5e751381366dcde13cf983e041e300ee2.tar.bz2
vcxsrv-d92d86b5e751381366dcde13cf983e041e300ee2.zip
svn merge ^/branches/released .
Diffstat (limited to 'libxcb/src/xcb_util.c')
-rw-r--r--libxcb/src/xcb_util.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/libxcb/src/xcb_util.c b/libxcb/src/xcb_util.c
index e1e48ce0d..b999ea528 100644
--- a/libxcb/src/xcb_util.c
+++ b/libxcb/src/xcb_util.c
@@ -178,22 +178,20 @@ static int _xcb_open(const char *host, char *protocol, const int display)
int actual_filelen;
#ifdef HAVE_LAUNCHD
- if(strncmp(host, "/tmp/launch", 11) == 0) {
- base = host;
- host = "";
- protocol = NULL;
- }
+ if(strncmp(host, "/tmp/launch", 11) == 0) {
+ base = host;
+ host = "";
+ protocol = NULL;
+ }
#endif
- if(*host || protocol)
+ /* If protocol or host is "unix", fall through to Unix socket code below */
+ if ((!protocol || (strcmp("unix",protocol) != 0)) &&
+ (*host != '\0') && (strcmp("unix",host) != 0))
{
- if (protocol
- || strcmp("unix",host)) { /* follow the old unix: rule */
-
- /* display specifies TCP */
- unsigned short port = X_TCP_PORT + display;
- return _xcb_open_tcp(host, protocol, port);
- }
+ /* display specifies TCP */
+ unsigned short port = X_TCP_PORT + display;
+ return _xcb_open_tcp(host, protocol, port);
}
#ifndef _WIN32