aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/os/connection.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-04-16 09:32:42 +0000
committermarha <marha@users.sourceforge.net>2010-04-16 09:32:42 +0000
commit0afd2d366de6470b72f0d305643be9afd8cc461d (patch)
tree9363104b0080ddd001256d1b3a0eceae078f13a0 /xorg-server/os/connection.c
parent6412df1b3df28c6213b43821c4a98cc3857d9a3f (diff)
downloadvcxsrv-0afd2d366de6470b72f0d305643be9afd8cc461d.tar.gz
vcxsrv-0afd2d366de6470b72f0d305643be9afd8cc461d.tar.bz2
vcxsrv-0afd2d366de6470b72f0d305643be9afd8cc461d.zip
git update 16/4/2010
Diffstat (limited to 'xorg-server/os/connection.c')
-rw-r--r--xorg-server/os/connection.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/xorg-server/os/connection.c b/xorg-server/os/connection.c
index 3ff93bbb6..61ba72a80 100644
--- a/xorg-server/os/connection.c
+++ b/xorg-server/os/connection.c
@@ -1253,10 +1253,11 @@ MakeClientGrabPervious(ClientPtr client)
void ListenOnOpenFD(int fd, int noxauth) {
char port[256];
XtransConnInfo ciptr;
+ const char *display_env = getenv("DISPLAY");
- if(!strncmp(getenv("DISPLAY"), "/tmp/launch", 11)) {
+ if(display_env && (strncmp(display_env, "/tmp/launch", 11) == 0)) {
/* Make the path the launchd socket if our DISPLAY is set right */
- strcpy(port, getenv("DISPLAY"));
+ strcpy(port, display_env);
} else {
/* Just some default so things don't break and die. */
sprintf(port, ":%d", atoi(display));