aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src/ftp/ftp.erl
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2012-01-05 12:24:31 +0100
committerMicael Karlberg <[email protected]>2012-01-05 12:24:31 +0100
commitbe7a927e000c0b772fefa43343b7a14d9070d871 (patch)
tree1bb81b3c405fa5d5631a1c6380889a0f5025d39d /lib/inets/src/ftp/ftp.erl
parent021d5c2e49e623d4f43c0cc88a097bc99f3564e6 (diff)
parentc1fe4ce53f2df2c10078de2abae712d49fd6a633 (diff)
downloadotp-be7a927e000c0b772fefa43343b7a14d9070d871.tar.gz
otp-be7a927e000c0b772fefa43343b7a14d9070d871.tar.bz2
otp-be7a927e000c0b772fefa43343b7a14d9070d871.zip
Merge branch 'bmk/inets/ftp/bad_ipv6_formatting_in_eprt/r14/OTP-9827' into bmk/inets/inets573_integration
Diffstat (limited to 'lib/inets/src/ftp/ftp.erl')
-rw-r--r--lib/inets/src/ftp/ftp.erl7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/inets/src/ftp/ftp.erl b/lib/inets/src/ftp/ftp.erl
index ac72963347..3028cd800f 100644
--- a/lib/inets/src/ftp/ftp.erl
+++ b/lib/inets/src/ftp/ftp.erl
@@ -1912,17 +1912,14 @@ setup_ctrl_connection(Host, Port, Timeout, State) ->
setup_data_connection(#state{mode = active,
caller = Caller,
csock = CSock} = State) ->
- IntToString = fun(Element) -> integer_to_list(Element) end,
-
case (catch inet:sockname(CSock)) of
{ok, {{_, _, _, _, _, _, _, _} = IP, _}} ->
{ok, LSock} =
gen_tcp:listen(0, [{ip, IP}, {active, false},
inet6, binary, {packet, 0}]),
{ok, Port} = inet:port(LSock),
- Cmd = mk_cmd("EPRT |2|~s:~s:~s:~s:~s:~s:~s:~s|~s|",
- lists:map(IntToString,
- tuple_to_list(IP) ++ [Port])),
+ IpAddress = inet_parse:ntoa(IP),
+ Cmd = mk_cmd("EPRT |2|~s|~p|", [IpAddress, Port]),
send_ctrl_message(State, Cmd),
activate_ctrl_connection(State),
{noreply, State#state{caller = {setup_data_connection,