From 5351f56ae1eb1a68b76d103d6075a092a0560ab4 Mon Sep 17 00:00:00 2001 From: Badlop Date: Sun, 9 Mar 2008 10:09:38 +0000 Subject: [PATCH] * src/mod_proxy65/mod_proxy65_service.erl: Implement alternative to the deprecated function inet:ip_to_bytes (thanks to Evgeniy Khramtsov)(EJAB-542) SVN Revision: 1222 --- ChangeLog | 6 ++++++ src/mod_proxy65/mod_proxy65_service.erl | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index dc605350e..21b026407 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-03-09 Badlop + + * src/mod_proxy65/mod_proxy65_service.erl: Implement alternative + to the deprecated function inet:ip_to_bytes (thanks to Evgeniy + Khramtsov)(EJAB-542) + 2008-03-04 Badlop * doc/guide.tex: Improve documentation of host_config diff --git a/src/mod_proxy65/mod_proxy65_service.erl b/src/mod_proxy65/mod_proxy65_service.erl index 78392fa47..41c3af7d5 100644 --- a/src/mod_proxy65/mod_proxy65_service.erl +++ b/src/mod_proxy65/mod_proxy65_service.erl @@ -201,7 +201,7 @@ parse_options(ServerHost, Opts) -> none -> get_proxy_or_domainip(ServerHost, MyHost); Addr -> Addr end, - [_ | StrIP] = lists:append([[$. | integer_to_list(X)] || X <- inet:ip_to_bytes(IP)]), + StrIP = inet_parse:ntoa(IP), StreamAddr = [{"jid", MyHost}, {"host", StrIP}, {"port", integer_to_list(Port)}], {IP, #state{myhost = MyHost, serverhost = ServerHost,