1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 11:03:00 +01:00

trap getaddrinfo return codes

This commit is contained in:
Chris Guillott
2017-09-09 23:48:29 -04:00
committed by Michał Janiszewski
parent e5bfd241ea
commit 5991c25919

View File

@@ -451,6 +451,13 @@ private:
addrinfo * result = nullptr;
getaddrinfo(address, serviceName.c_str(), &hints, &result);
int errorcode = getaddrinfo(address, serviceName.c_str(), &hints, &result);
if (errorcode != 0)
{
log_error("Resolving address failed: Code %d.", errorcode);
log_error("Resolution error message: %s.", gai_strerror(errorcode));
return false;
}
if (result == nullptr)
{
return false;