aboutsummaryrefslogtreecommitdiff
path: root/nxcomp/Loop.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'nxcomp/Loop.cpp')
-rw-r--r--nxcomp/Loop.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/nxcomp/Loop.cpp b/nxcomp/Loop.cpp
index f051130dd..450c477c6 100644
--- a/nxcomp/Loop.cpp
+++ b/nxcomp/Loop.cpp
@@ -6629,22 +6629,16 @@ int WaitForRemote(int portNum)
goto WaitForRemoteError;
}
- }
-
- proxyFD = ListenConnectionTCP( ((loopbackBind || (control->ProxyMode == proxy_server)) ? "localhost" : "*"),
- portNum, "NX");
-
- if (*acceptHost != '\0')
- {
- strcat(hostLabel, "'");
- strcat(hostLabel, acceptHost);
- strcat(hostLabel, "'");
+ strcpy(hostLabel, "any host");
}
else
{
- strcpy(hostLabel, "any host");
+ snprintf(hostLabel, sizeof(hostLabel), "'%s'", acceptHost);
}
+ proxyFD = ListenConnectionTCP(((loopbackBind || (control->ProxyMode == proxy_server)) ? "localhost" : "*"),
+ portNum, "NX");
+
#ifdef TEST
*logofs << "Loop: Waiting for connection from "
<< hostLabel << " on port '" << portNum