diff options
author | Salvador Fandino <sfandino@yahoo.com> | 2015-06-02 14:55:40 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2016-07-04 22:57:01 +0200 |
commit | b23dcd101a3fbfe662479ddfe6985bd2b874741f (patch) | |
tree | 4bb6608684bdf5effb2cf06ad30e143d18c539f6 /nxcomp | |
parent | f706d774b4dfd4c4254c3cf5c29ec28eb9313568 (diff) | |
download | nx-libs-b23dcd101a3fbfe662479ddfe6985bd2b874741f.tar.gz nx-libs-b23dcd101a3fbfe662479ddfe6985bd2b874741f.tar.bz2 nx-libs-b23dcd101a3fbfe662479ddfe6985bd2b874741f.zip |
merge code paths depending on acceptHost being ""
Diffstat (limited to 'nxcomp')
-rw-r--r-- | nxcomp/Loop.cpp | 16 |
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 |