Commit 889de46f authored by Vadim's avatar Vadim

Fix parsing ports set to unix sockets

parent 5c99eb7d
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment