diff options
author | Hans Nilsson <[email protected]> | 2013-12-02 14:41:57 +0100 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2013-12-03 15:17:47 +0100 |
commit | 5cf8802395b3a71dac26a80fcd801b8ab4db0286 (patch) | |
tree | 87a3574ceaf3b93ebfb0a70cad78a91121c30f28 /lib/inets | |
parent | 586345ae7c2d49203ff984ccf1e64cf99f3d5b73 (diff) | |
download | otp-5cf8802395b3a71dac26a80fcd801b8ab4db0286.tar.gz otp-5cf8802395b3a71dac26a80fcd801b8ab4db0286.tar.bz2 otp-5cf8802395b3a71dac26a80fcd801b8ab4db0286.zip |
ftp: fix sockname dialyzer warning including ftp:sockname/1 bug
Diffstat (limited to 'lib/inets')
-rw-r--r-- | lib/inets/src/ftp/ftp.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/inets/src/ftp/ftp.erl b/lib/inets/src/ftp/ftp.erl index 86ef9280ad..520db1b457 100644 --- a/lib/inets/src/ftp/ftp.erl +++ b/lib/inets/src/ftp/ftp.erl @@ -2068,7 +2068,7 @@ setup_data_connection(#state{mode = active, {ok, LSock} = gen_tcp:listen(0, [{ip, IP}, {active, false}, inet6, binary, {packet, 0}]), - {ok, {_, Port}} = sockname(LSock), + {ok, {_, Port}} = sockname({tcp,LSock}), IpAddress = inet_parse:ntoa(IP), Cmd = mk_cmd("EPRT |2|~s|~p|", [IpAddress, Port]), send_ctrl_message(State, Cmd), @@ -2351,8 +2351,8 @@ millisec_time() -> peername({tcp, Socket}) -> inet:peername(Socket); peername({ssl, Socket}) -> ssl:peername(Socket). -sockname({tcp, Socket}) -> inet:peername(Socket); -sockname({ssl, Socket}) -> ssl:peername(Socket). +sockname({tcp, Socket}) -> inet:sockname(Socket); +sockname({ssl, Socket}) -> ssl:sockname(Socket). maybe_tls_upgrade(Pid, undefined) -> {ok, Pid}; |