aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src/ftp/ftp.erl
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2012-01-20 18:40:10 +0100
committerMicael Karlberg <[email protected]>2012-01-20 18:40:10 +0100
commite8d003e44171f4ed04aaa017b7010ee5746162a9 (patch)
treebe3b89e0f25d74d59134396e9043277532cf8478 /lib/inets/src/ftp/ftp.erl
parent5790c87a3c155dbe49b82a8f3b3b74f9fec9d71d (diff)
parent4f9b2b2b2917ffca17be3a897674ffe76011237f (diff)
downloadotp-e8d003e44171f4ed04aaa017b7010ee5746162a9.tar.gz
otp-e8d003e44171f4ed04aaa017b7010ee5746162a9.tar.bz2
otp-e8d003e44171f4ed04aaa017b7010ee5746162a9.zip
[inets] Merged from R14B and also fixed appup
Merge from R14B integration branch (for inets-5.7.3) and fixed appup and corresponding code-change code to work in new version (inets-5.8.1). Also some minor (R15B specific) test suite fixes. Merge branch 'bmk/inets/inets573_integration' into bmk/inets/inets581_integration/r15 Conflicts: lib/inets/doc/src/notes.xml lib/inets/src/http_client/httpc_internal.hrl lib/inets/src/inets_app/inets.appup.src lib/inets/vsn.mk
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,