Use inet:gethostbyname instead of inet_res:getbyname

SVN Revision: 1758
This commit is contained in:
Badlop 2008-12-26 18:36:53 +00:00
parent 394245620e
commit 1944aa097f
1 changed files with 5 additions and 5 deletions

View File

@ -1010,12 +1010,12 @@ test_get_addr_port(Server) ->
get_addrs(Host, Family) ->
Type = case Family of
inet4 -> a;
ipv4 -> a;
inet6 -> aaaa;
ipv6 -> aaaa
inet4 -> inet;
ipv4 -> inet;
inet6 -> inet6;
ipv6 -> inet6
end,
case inet_res:getbyname(Host, Type) of
case inet:gethostbyname(Host, Type) of
{ok, #hostent{h_addr_list = Addrs}} ->
?DEBUG("~s of ~s resolved to: ~p~n", [Type, Host, Addrs]),
Addrs;