Fix for 4251 - assumeUnique cannot receive in char[]

This commit is contained in:
k-hara 2011-12-12 10:25:13 +09:00
parent 17e87a472d
commit 7f67f8d932

View file

@ -1051,7 +1051,7 @@ Address[] getAddress(in char[] hostname, ushort port)
auto ih = new InternetHost;
if (!ih.getHostByName(hostname))
throw new AddressException(
"Unable to resolve host '" ~ assumeUnique(hostname) ~ "'");
text("Unable to resolve host '", hostname, "'"));
Address[] results;
foreach (uint addr; ih.addrList)
@ -1468,7 +1468,7 @@ public:
if(!ih.getHostByName(addr))
//throw new AddressException("Invalid internet address");
throw new AddressException(
"Unable to resolve host '" ~ assumeUnique(addr) ~ "'");
text("Unable to resolve host '", addr, "'"));
uiaddr = ih.addrList[0];
}
sin.sin_family = AddressFamily.INET;