diff options
author | Hans Nilsson <[email protected]> | 2013-12-02 14:41:57 +0100 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2014-02-05 10:32:27 +0100 |
commit | 58889fea10db8188fff663a89cd7660bdbe855fe (patch) | |
tree | 8799ead5ec6ff23be26474e95533d6c19ade6c2d | |
parent | 60e0f4cce2f9caeb60ae44cbe18b3eb3ca75a5a8 (diff) | |
download | otp-58889fea10db8188fff663a89cd7660bdbe855fe.tar.gz otp-58889fea10db8188fff663a89cd7660bdbe855fe.tar.bz2 otp-58889fea10db8188fff663a89cd7660bdbe855fe.zip |
ftp: fix sockname dialyzer warning including ftp:sockname/1 bug
-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 fe92001a6f..6197838d92 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}; |