24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-08 21:43:07 +02:00

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

View File

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