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, 4 insertions, 12 deletions
diff --git a/nxcomp/Loop.cpp b/nxcomp/Loop.cpp
index 7e8b1ec62..aab5c356d 100644
--- a/nxcomp/Loop.cpp
+++ b/nxcomp/Loop.cpp
@@ -13571,25 +13571,17 @@ int ParseListenOption(int &address)
// on localhost.
//
- if (control -> ProxyMode == proxy_server)
- {
- address = (int) inet_addr("127.0.0.1");
+ if (loopbackBind || (control->ProxyMode == proxy_server)) {
+ address = htonl(INADDR_LOOPBACK);
}
else
{
- if ( loopbackBind )
- {
- address = htonl(INADDR_LOOPBACK);
- }
- else
- {
- address = htonl(INADDR_ANY);
- }
+ address = htonl(INADDR_ANY);
}
}
else
{
- address = inet_addr(listenHost);
+ address = GetHostAddress(listenHost);
}
return 1;