mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
Merge pull request #18647 from ClickHouse/remove-getservbyname
Remove useless support for symbolic port names
This commit is contained in:
commit
07411aafd2
@ -80,13 +80,7 @@ static void splitHostAndPort(const std::string & host_and_port, std::string & ou
|
|||||||
out_port = static_cast<UInt16>(port);
|
out_port = static_cast<UInt16>(port);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
throw Exception("Port must be numeric", ErrorCodes::BAD_ARGUMENTS);
|
||||||
struct servent * se = getservbyname(port_str.c_str(), nullptr);
|
|
||||||
if (se)
|
|
||||||
out_port = ntohs(static_cast<UInt16>(se->s_port));
|
|
||||||
else
|
|
||||||
throw Exception("Service not found", ErrorCodes::BAD_ARGUMENTS);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static DNSResolver::IPAddresses resolveIPAddressImpl(const std::string & host)
|
static DNSResolver::IPAddresses resolveIPAddressImpl(const std::string & host)
|
||||||
|
Loading…
Reference in New Issue
Block a user