aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2013-12-03 16:41:04 +0100
committerHans Nilsson <[email protected]>2013-12-03 16:41:04 +0100
commit197fab5e0caae5233411acbc8cdd82b7f539bb4c (patch)
tree87a3574ceaf3b93ebfb0a70cad78a91121c30f28
parent586345ae7c2d49203ff984ccf1e64cf99f3d5b73 (diff)
parent5cf8802395b3a71dac26a80fcd801b8ab4db0286 (diff)
downloadotp-197fab5e0caae5233411acbc8cdd82b7f539bb4c.tar.gz
otp-197fab5e0caae5233411acbc8cdd82b7f539bb4c.tar.bz2
otp-197fab5e0caae5233411acbc8cdd82b7f539bb4c.zip
Merge branch 'hans/ftp/dialyzer_warning' into maint
* hans/ftp/dialyzer_warning: ftp: fix sockname dialyzer warning including ftp:sockname/1 bug
-rw-r--r--lib/inets/src/ftp/ftp.erl6
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};