aboutsummaryrefslogtreecommitdiff
path: root/nxcomp/src/Loop.cpp
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2019-01-25 16:37:29 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2019-01-25 16:37:29 +0100
commit26e483d495cb06b9af5d04b44ae7176885433072 (patch)
treed94b76f7a2658051d16df5023b1c289922ccea8d /nxcomp/src/Loop.cpp
parentca8236e7fe565e851362a744bfa0312274e1f856 (diff)
parent889de46f759913742478d2cfe20f1f4a6c2effdc (diff)
downloadnx-libs-26e483d495cb06b9af5d04b44ae7176885433072.tar.gz
nx-libs-26e483d495cb06b9af5d04b44ae7176885433072.tar.bz2
nx-libs-26e483d495cb06b9af5d04b44ae7176885433072.zip
Merge branch 'theqvd-unix_socket_forwarding' into 3.6.x
Attributes GH PR #764: https://github.com/ArcticaProject/nx-libs/pull/764
Diffstat (limited to 'nxcomp/src/Loop.cpp')
-rw-r--r--nxcomp/src/Loop.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/nxcomp/src/Loop.cpp b/nxcomp/src/Loop.cpp
index ddffcd1ca..8e6f20efb 100644
--- a/nxcomp/src/Loop.cpp
+++ b/nxcomp/src/Loop.cpp
@@ -7803,6 +7803,7 @@ int ParseEnvironmentOptions(const char *env, int force)
strcpy(opts, env);
char *nextOpts = opts;
+ bool nxdisplay_found = false;
//
// Ensure that DISPLAY environment variable
@@ -7824,14 +7825,17 @@ int ParseEnvironmentOptions(const char *env, int force)
else if (strncasecmp(opts, "nx/nx,", 6) == 0)
{
nextOpts += 6;
+ nxdisplay_found = true;
}
else if (strncasecmp(opts, "nx,", 3) == 0)
{
nextOpts += 3;
+ nxdisplay_found = true;
}
else if (strncasecmp(opts, "nx:", 3) == 0)
{
nextOpts += 3;
+ nxdisplay_found = true;
}
else if (force == 0)
{
@@ -7860,7 +7864,7 @@ int ParseEnvironmentOptions(const char *env, int force)
value = strrchr(nextOpts, ':');
- if (value != NULL)
+ if (value != NULL && nxdisplay_found )
{
char *check = value + 1;