aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/src/ssh_connection.erl
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2019-08-19 15:15:58 +0200
committerHans Nilsson <[email protected]>2019-08-19 15:15:58 +0200
commit643789cc505432395eb82d4c9b8f0e520969f2b7 (patch)
treea8a347f861d43eb7851c01b7f04783bf13331590 /lib/ssh/src/ssh_connection.erl
parent6427b430346287bea468d896af4a6c8ca5948284 (diff)
parent8722bd998d51c4063e3e75242d429c9d1225453d (diff)
downloadotp-643789cc505432395eb82d4c9b8f0e520969f2b7.tar.gz
otp-643789cc505432395eb82d4c9b8f0e520969f2b7.tar.bz2
otp-643789cc505432395eb82d4c9b8f0e520969f2b7.zip
Merge branch 'maint'
* maint: ssh: Remove unused address,port from #connection{} ssh: Remove unused port_bindings from #connection{}
Diffstat (limited to 'lib/ssh/src/ssh_connection.erl')
-rw-r--r--lib/ssh/src/ssh_connection.erl26
1 files changed, 1 insertions, 25 deletions
diff --git a/lib/ssh/src/ssh_connection.erl b/lib/ssh/src/ssh_connection.erl
index 83f85b1d8e..5d773c50b0 100644
--- a/lib/ssh/src/ssh_connection.erl
+++ b/lib/ssh/src/ssh_connection.erl
@@ -60,8 +60,7 @@
request_failure_msg/0,
request_success_msg/1,
- bind/4, unbind/3, unbind_channel/2,
- bound_channel/3, encode_ip/1
+ encode_ip/1
]).
-type connection_ref() :: ssh:connection_ref().
@@ -713,29 +712,6 @@ request_success_msg(Data) ->
%%%----------------------------------------------------------------
%%%
%%%
-bind(IP, Port, ChannelPid, Connection) ->
- Binds = [{{IP, Port}, ChannelPid}
- | lists:keydelete({IP, Port}, 1,
- Connection#connection.port_bindings)],
- Connection#connection{port_bindings = Binds}.
-
-unbind(IP, Port, Connection) ->
- Connection#connection{
- port_bindings =
- lists:keydelete({IP, Port}, 1,
- Connection#connection.port_bindings)}.
-unbind_channel(ChannelPid, Connection) ->
- Binds = [{Bind, ChannelP} || {Bind, ChannelP}
- <- Connection#connection.port_bindings,
- ChannelP =/= ChannelPid],
- Connection#connection{port_bindings = Binds}.
-
-bound_channel(IP, Port, Connection) ->
- case lists:keysearch({IP, Port}, 1, Connection#connection.port_bindings) of
- {value, {{IP, Port}, ChannelPid}} -> ChannelPid;
- _ -> undefined
- end.
-
encode_ip(Addr) when is_tuple(Addr) ->
case catch inet_parse:ntoa(Addr) of
{'EXIT',_} -> false;