aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nxcomp/Loop.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/nxcomp/Loop.cpp b/nxcomp/Loop.cpp
index c566aa2d1..86c951a06 100644
--- a/nxcomp/Loop.cpp
+++ b/nxcomp/Loop.cpp
@@ -6692,11 +6692,15 @@ int WaitForRemote(ChannelEndPoint &socketAddress)
strcpy(hostLabel, "any host");
}
- if (loopbackBind)
+ long bindPort;
+ if (socketAddress.getTCPHostAndPort(NULL, &bindPort))
{
- long bindPort;
- if (socketAddress.getTCPHostAndPort(NULL, &bindPort))
- socketAddress.setSpec("localhost", bindPort);
+ socketAddress.setSpec(loopbackBind ? "localhost" : "*", bindPort);
+ }
+ else
+ {
+ // This should never happen
+ cerr << "Error" << ": Unable to change bind host\n";
}
}
else if (socketAddress.isUnixSocket())