From 1f91eb0b1139e7a134e3c8300a9d74f07cdda911 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20R=C3=A9mond?= Date: Wed, 14 May 2008 17:49:23 +0000 Subject: * Adding experimental branch. SVN Revision: 1324 --- src/jlib.erl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/jlib.erl') diff --git a/src/jlib.erl b/src/jlib.erl index 1ee2e4ffa..4fd897599 100644 --- a/src/jlib.erl +++ b/src/jlib.erl @@ -59,7 +59,8 @@ now_to_local_string/1, datetime_string_to_timestamp/1, decode_base64/1, - encode_base64/1]). + encode_base64/1, + ip_to_list/1]). -include("jlib.hrl"). @@ -676,3 +677,9 @@ e(X) when X>51, X<62 -> X-4; e(62) -> $+; e(63) -> $/; e(X) -> exit({bad_encode_base64_token, X}). + +%% Convert Erlang inet IP to list +ip_to_list({IP, _Port}) -> + ip_to_list(IP); +ip_to_list({A,B,C,D}) -> + lists:flatten(io_lib:format("~w.~w.~w.~w",[A,B,C,D])). -- cgit v1.2.3