diff options
author | Erlang/OTP <[email protected]> | 2012-01-20 18:45:47 +0100 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2012-01-20 18:45:47 +0100 |
commit | a8af5a6bae97ddd7bfc2bcff2e701fa37f47640c (patch) | |
tree | be3b89e0f25d74d59134396e9043277532cf8478 /lib/inets/src/ftp/ftp.erl | |
parent | 5790c87a3c155dbe49b82a8f3b3b74f9fec9d71d (diff) | |
parent | e8d003e44171f4ed04aaa017b7010ee5746162a9 (diff) | |
download | otp-a8af5a6bae97ddd7bfc2bcff2e701fa37f47640c.tar.gz otp-a8af5a6bae97ddd7bfc2bcff2e701fa37f47640c.tar.bz2 otp-a8af5a6bae97ddd7bfc2bcff2e701fa37f47640c.zip |
Merge branch 'bmk/inets/inets581_integration/r15' into maint-r15
* bmk/inets/inets581_integration/r15:
[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.erl | 7 |
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, |