mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
Make jlib:ip_to_list safe to use
This commit is contained in:
parent
b9f4daca46
commit
b47c50145d
@ -803,4 +803,6 @@ ip_to_list({_,_,_,_,_,_,_,_} = Ipv6Address) ->
|
||||
inet_parse:ntoa(Ipv6Address);
|
||||
%% This function clause could use inet_parse too:
|
||||
ip_to_list({A,B,C,D}) ->
|
||||
lists:flatten(io_lib:format("~w.~w.~w.~w",[A,B,C,D])).
|
||||
lists:flatten(io_lib:format("~w.~w.~w.~w",[A,B,C,D]));
|
||||
ip_to_list(IP) ->
|
||||
lists:flatten(io_lib:format("~w", [IP])).
|
||||
|
Loading…
Reference in New Issue
Block a user