aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2017-03-21 15:44:44 +0100
committerHans Nilsson <[email protected]>2017-04-07 10:23:33 +0200
commit57d994270d63e7a9ce80eece3c1c3aeca79d3ea4 (patch)
tree99a7aa83a5366ca80ea144bc6fded3eba0a8e5e9 /lib
parent90aacace4bdb1c883c3829bc66c1c616a81943d9 (diff)
downloadotp-57d994270d63e7a9ce80eece3c1c3aeca79d3ea4.tar.gz
otp-57d994270d63e7a9ce80eece3c1c3aeca79d3ea4.tar.bz2
otp-57d994270d63e7a9ce80eece3c1c3aeca79d3ea4.zip
ssh: fix ssh_system_sup naming of Host-Port-Profile
Diffstat (limited to 'lib')
-rw-r--r--lib/ssh/src/ssh.erl2
-rw-r--r--lib/ssh/src/ssh_acceptor_sup.erl7
-rw-r--r--lib/ssh/src/ssh_system_sup.erl16
-rw-r--r--lib/ssh/src/sshd_sup.erl7
4 files changed, 5 insertions, 27 deletions
diff --git a/lib/ssh/src/ssh.erl b/lib/ssh/src/ssh.erl
index ff424b738c..9047b7e0f0 100644
--- a/lib/ssh/src/ssh.erl
+++ b/lib/ssh/src/ssh.erl
@@ -475,6 +475,6 @@ finalize_start(Host, Port, Profile, Options0, F) ->
end.
%%%----------------------------------------------------------------
-fmt_host(any) -> any;
+fmt_host(any) -> "any";
fmt_host(IP) when is_tuple(IP) -> inet:ntoa(IP);
fmt_host(Str) when is_list(Str) -> Str.
diff --git a/lib/ssh/src/ssh_acceptor_sup.erl b/lib/ssh/src/ssh_acceptor_sup.erl
index 77f7826918..613d8fbc75 100644
--- a/lib/ssh/src/ssh_acceptor_sup.erl
+++ b/lib/ssh/src/ssh_acceptor_sup.erl
@@ -93,10 +93,5 @@ child_spec(Options) ->
{Name, StartFunc, Restart, Shutdown, Type, Modules}.
id(Address, Port, Profile) ->
- case is_list(Address) of
- true ->
- {ssh_acceptor_sup, any, Port, Profile};
- false ->
- {ssh_acceptor_sup, Address, Port, Profile}
- end.
+ {ssh_acceptor_sup, Address, Port, Profile}.
diff --git a/lib/ssh/src/ssh_system_sup.erl b/lib/ssh/src/ssh_system_sup.erl
index 5a58ef1c44..4083f666c3 100644
--- a/lib/ssh/src/ssh_system_sup.erl
+++ b/lib/ssh/src/ssh_system_sup.erl
@@ -166,22 +166,10 @@ ssh_subsystem_child_spec(Options) ->
id(Sup, Address, Port, Profile) ->
- case is_list(Address) of
- true ->
- {Sup, any, Port, Profile};
- false ->
- {Sup, Address, Port, Profile}
- end.
+ {Sup, Address, Port, Profile}.
make_name(Address, Port, Profile) ->
- case is_list(Address) of
- true ->
- list_to_atom(lists:flatten(io_lib:format("ssh_system_~p_~p_~p_sup",
- [any, Port, Profile])));
- false ->
- list_to_atom(lists:flatten(io_lib:format("ssh_system_~p_~p_~p_sup",
- [Address, Port, Profile])))
- end.
+ list_to_atom(lists:flatten(io_lib:format("ssh_system_~s_~p_~p_sup", [Address, Port, Profile]))).
ssh_subsystem_sup([{_, Child, _, [ssh_subsystem_sup]} | _]) ->
Child;
diff --git a/lib/ssh/src/sshd_sup.erl b/lib/ssh/src/sshd_sup.erl
index 14f1937abd..791456839d 100644
--- a/lib/ssh/src/sshd_sup.erl
+++ b/lib/ssh/src/sshd_sup.erl
@@ -103,12 +103,7 @@ child_spec(Address, Port, Options) ->
{Name, StartFunc, Restart, Shutdown, Type, Modules}.
id(Address, Port, Profile) ->
- case is_list(Address) of
- true ->
- {server, ssh_system_sup, any, Port, Profile};
- false ->
- {server, ssh_system_sup, Address, Port, Profile}
- end.
+ {server, ssh_system_sup, Address, Port, Profile}.
system_name([], _ ) ->
undefined;