aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src/ftp/ftp.erl
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2012-01-23 14:09:22 +0100
committerMicael Karlberg <[email protected]>2012-01-23 14:09:22 +0100
commit7e6ac31a0c918f42e747628db8fec610f5bd424c (patch)
tree4294a95a34fdec1e28504bd90230f15a2816e106 /lib/inets/src/ftp/ftp.erl
parentefe40df70999f798590cdbfd6648375891aa0ab0 (diff)
parenta8af5a6bae97ddd7bfc2bcff2e701fa37f47640c (diff)
downloadotp-7e6ac31a0c918f42e747628db8fec610f5bd424c.tar.gz
otp-7e6ac31a0c918f42e747628db8fec610f5bd424c.tar.bz2
otp-7e6ac31a0c918f42e747628db8fec610f5bd424c.zip
Merge branch 'maint-r15' into maint
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 b6da92947c..560ee55271 100644
--- a/lib/inets/src/ftp/ftp.erl
+++ b/lib/inets/src/ftp/ftp.erl
@@ -1987,17 +1987,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,