aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/src/ftp/ftp.erl
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2012-01-17 15:52:46 +0100
committerErlang/OTP <[email protected]>2012-01-17 15:52:46 +0100
commit7619b94a2c1098cbd176507b34d291806833a4b7 (patch)
tree1d41ecb5d95517ba6e64b410da18db3b2d16801e /lib/inets/src/ftp/ftp.erl
parentffd9f3c009ff53fc4d1c1f59b04d72702524413c (diff)
parent4f9b2b2b2917ffca17be3a897674ffe76011237f (diff)
downloadotp-7619b94a2c1098cbd176507b34d291806833a4b7.tar.gz
otp-7619b94a2c1098cbd176507b34d291806833a4b7.tar.bz2
otp-7619b94a2c1098cbd176507b34d291806833a4b7.zip
Merge branch 'bmk/inets/inets573_integration' into maint-r14
* bmk/inets/inets573_integration: [inets/httpc] The client incorrectly streams 404 responses [inets/httpc] Add proper code change code [inets/httpc] Add test case [inets] Add proper release notes for OTP-9847 [inets/httpc] Fix the selection of session for keep-alive mode When selecting a session, the "state" of the session (specifically if the server has responded) was not taken into account. Attempting to fix this, a "state" field (actually available) has been added to the session record. [ftp] Fails to open IPv6 connection
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,