mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-22 17:28:25 +01:00
Use inet:gethostbyname instead of inet_res:getbyname
SVN Revision: 1758
This commit is contained in:
parent
394245620e
commit
1944aa097f
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user