Commit d2e8551e authored by Salvador Fandino's avatar Salvador Fandino Committed by Mike Gabriel

Simplify ParseListenOption

Merge code paths. Use GetHostAddress to resolve the target host address instead of inet_aton.
parent 5ea2d901
......@@ -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;
......
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